C Programming
C Programming
Type
char
unsigned char
signed char
int
unsigned int
signed int
short int
unsigned short int
signed short int
long int
long long int
signed long int
unsigned long int
unsigned long long int
float
double
long double
Size
(bit)
8
8
8
32
32
32
16
16
16
32
64
32
32
64
32
64
80
Range
-27 to 27-1
0 to 28-1
27 to 27-1
-231 to 231-1
0 to 232-1
Same as int
-215 to 215-1
0 to 216-1
Same as short int
-231 to 231-1
-263 to 263-1
Same as long int
0 to 232-1
0 to 264-1
1E37 to 1E+37 with six digits of precision
1E37 to 1E+37 with ten digits of precision
1E37 to 1E+37 with ten digits of precision
Operators
Arithmetic: +, -, *, /, %
Assignment: =
Augmented assignment: +=, -=, *=, /=, %=, &=, |=, ^=, <<=, >>=
Bitwise logic: ~, &, |, ^
Bitwise shifts: <<, >>
Boolean logic: !, &&, ||
Conditional evaluation: ? :
Equality testing: ==, !=
Increment and decrement: ++, -Member selection: ., ->
Object size: sizeof
Order relations: <, <=, >, >=
Format
Specifier
%c
%c
%c
%d
%u
%d
%hi
%hu
%hi
%li
%lli
%li
%lu
%llu
%f
%lf
%Lf