| Start | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Fixed Width Integer Types (since C99) The header See the remarks section for usage hints of fixed width types. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Interpreting Declarations A distinctive syntactic peculiarity of C is that declarations mirror the use of the declared object as it would be in a normal expression. The following set of operators with identical precedence and associativity are reused in declarators, namely:
The above three operators have the following precedence and associativity:
When interpreting declarations, one has to start from the identifier outwards and apply the adjacent operators in the correct order as per the above table. Each application of an operator can be substituted with the following English words:
It follows that the beginning of the English interpretation will always start with the identifier and will end with the type that stands on the left-hand side of the declaration. Examples
In case of using parentheses to override the precedence, the There is no precedence to worry about here: The Overriding the precedence of Multidimensional arrays are not an exception to the rule; the The two dereference operators have equal precedence, so the associativity takes effect. The operators are applied in right-to-left order: Multiple DeclarationsThe declared objects in the above example are:
Alternative InterpretationBecause declarations mirror use, a declaration can also be interpreted in terms of the operators that could be applied over the object and the final resulting type of that expression. The type that stands on the left-hand side is the final result that is yielded after applying all operators. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Integer types and constants Signed integers can be of these types (the Each of these signed integer types has an unsigned version. For all types but Different types of integer constants (called literals in C jargon) can be written in different bases, and different width, based on their prefix or suffix. Decimal constants are always Without a suffix the constant has the first type that fits its value, that is a decimal constant that is larger than The header file
If the value of an object of type The C99 standard added a new header, |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Floating Point Constants The C language has three mandatory real floating point types, The header Floating point arithmetic is implementation defined. However, most modern platforms (arm, x86, x86_64, MIPS) use IEEE 754 (opens new window) floating point operations. C also has three optional complex floating point types that are derived from the above. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| String Literals A string literal in C is a sequence of chars, terminated by a literal zero. String literals are not modifiable (and in fact may be placed in read-only memory such as .rodata). Attempting to alter their values results in undefined behaviour. Multiple string literals are concatenated at compile time, which means you can write construct like these. String literals, same as character constants, support different character sets. Remarks
|
Read Article
https://develop.horje.com/learn/1434/reference