- A bit-field or field for short, is a set of adjacent bits within a single implementation-defined storage unit that we will call a "word"
C Programming
Notes on C programming language K&R
Friday, June 17, 2011
6.9 Bit-fields
6.8 Unions
- A union is a variable that may hold (at different times) objects of different types and sizes, with the compiler keeping track of size and alignment requirements
- Unions provide a way to manipulate different kinds of data in a single area of storage, without embedding any machine-dependent information in the program
- Syntax:
Thursday, June 16, 2011
6.7 Typedef
- C provides a facility called typedef for creating new data type names
- ie. typedef int Length; (Length a synonym for int)
- ie. typedef char *String; (String a synonym for char * or character pointer)
Wednesday, June 15, 2011
Tuesday, June 14, 2011
6.3 Arrays of Structures
- Structure type key, with an array keytab of structures. Each elements of the array is a structure:
- Initialization:
Subscribe to:
Posts (Atom)