What to add:
Type descriptor: Long, long long, short, unsigned and signed
The type specifier is syntactically placed before the type of the declaring variable. For example, long int A is a variable A that declares a long integer.
1.long
The exact precision of a variable declared by long depends on the system, and on many systems the same range of values for type int and long int can be used to store integer values up to 32 bits wide (2 of 31 powers-1 or 2147483647). When declaring a long int type variable, you can add l after the integer constant, for example
long int numberofmax = 1122334455667L;
2.long Long
A long long declaration is a specified extension precision, which guarantees that the precision bit width is at least 64 bits, and the declared format is long long int numberofmax.
3.unsigned and signed
Apparently functionally opposite, unsigned is an unsigned, that is, not a negative number. unsigned int number This is number as a variable cannot be a negative number.
| Type |
Common examples |
printf characters |
| Char |
' A ', ' \ n ' |
%c |
| _bool |
0,1 |
%i,%u |
| Shrot int |
|
%hi,%hx,%ho |
| unsigned short int |
|
%hu,%hx,%ho |
| Int |
12,-100,0177 (octal), 0xffe0 (hex) |
%i,%o,%x |
| Unsigend int |
12u,100u,0xffu |
%u,%o,%x |
| Long int |
12l,-100,0xfffl |
%li,%lx,%lo |
| unsigned long int |
12ul,100ul,0xffeeul |
%lu,%lx,%lo |
| Long Long int |
0xe5e5e5e5ll,505ll |
%lli,%llx,%llo |
| unsigned long long int |
12ull,0xffeull |
%llu,%llx,%llo |
| Float |
12.34f,3.1e-5f,0x1.5p10,0x1p-1 |
%f,%e,%g,%a |
| Double |
1.23,3.1e-5,0x.1p3 |
%f,%e,%g,%a |
| Long double |
12.341,3.1e-5l |
%lf,%le,%lg |
C-Language Basics-Simple additions to data types