Chapter 3 C language statement analysis
Const int * grape;
Int const * grape;
Int * const grape;
In the last case, the pointer is read-only, and the above two pointers indicate that the object is read-only;
Struct can be used for field bits. I have never heard of it before:
# Include <stdio. h> int main () {struct bit_field {unsigned int A: 1; unsigned int B: 4; unsigned int C: 8 ;}; struct bit_field temp; temp. a = 1; printf ("% d \ n", temp. a); Return 0 ;}
If one rowCodeIt seems easier to do only one thing. For this reason, the declaration of variables should be separated from the declaration of types;
Some C-language books claim that "when calling a function, the parameters are pushed into the stack in the order from right to left". This is too simple-if you have a book like this, tear down the page and burn it. If you have such a compilerSource codeDelete the rows. Parameters are first stored in registers as much as possible during transmission (for speed );
Integration has both advantages and disadvantages. Its determination is what the so-called advantages are actually not very good. The advantage of Union is that it looks the same as the structure, but it replaces the keyword struct with the keyword Union;
# Include <stdio. h> int main () {Enum sizes {small = 7, medium, large = 10, humungous}; printf ("% d \ n", small ); printf ("% d \ n", medium); printf ("% d \ n", large); printf ("% d \ n", humungous); Return 0 ;}
The usage of enumeration is roughly the same as above;
There are two types of big data: one is a parameter and the other is not a parameter.