3. Simple variable
1. Reserved for use with two underscores or underscores and most alphabets; the name starting with a downline is reserved for the implementation as a global identifier.
2. The total number of types increases from left to right
Bool, Char, Signed Char, Unsigned Char, Short, UNSIGNED SHORT, INT, Unsigned Int, Long, unsigned long,
Wchar_t
3. The header
4. Many of the current systems use the minimum length, namely: Short is 16 bits; long minimum 32 bits; the length of the int type is the length of the computer's processing efficiency.
5. Variable initialization. (If it is not initialized, the value of the variable will be uncertain)
EG: int N = 100; // C style.
INT N (100); // C style
6. The hexadecimal is often used to represent a memory address, so use unsigned unsigned int compared to LONG more suitable.
7. Signed Char Representation - 128 ~ 127 Unsigned CHAR Representation Range 0 ~ 255 If the value of char can exceed 127, you need to use unsigned char
8. Char constant is used to use 'a' than 65. Because both only use the system using ASCII encoding, there are other codes such as: ebcdic
9.c has a BOOL type. Expressed with a predefined literal value true and false.
Advapsable conversion to int types. Any numeric value or pointer value can be implicitly converted to a BOOL type: non-○ value conversion to true, ○ Convert to FALSE
10.const qualifier
EG: const Int months = 12; // must be initialized, and modifications are not allowed after initialization.
C Prepare the compilation instruction with #define, you can define a constant.
CONST is better than #define: Clear specified type; there is a scope rule; can be used for more complex types.
11. Floating point E / E indication is suitable for very large and very small numbers.
12. The floating point is: float, double, longdouble 3 type. Default is Double
Active position: Float is at least 32 bits; Double at least 48, usually 64 bits; longdouble has 80,96,128 bits.
Index range: -37 ~ 37.
13.
14. There is only 6 effectiveness to Float C .
15. '/' Operator: If the 2 operands are int types, the results are also int types
'%' Is a moderate operator.
16. Type conversion: a. Conversion of assignment. The C of the exceeding range is not defined.
b. In the expression, there is an automatic conversion, the integer increase - the length is less than INT first increases to int type, and the result is converted after operation.
c. Transfer parameter type conversion.
d. Mandatory type conversion.
(long) count // C format long (count) // C format.