Professional Documents
Culture Documents
C Type Hierarchy
C Types
Integral Floating−point
Types Types
Enumerated Character
Types Types
Integer Types
10 = 21 + 23 = 0000 1010
#include <stdio.h>
#include <limits.h>
int main (void)
{
printf "%d, %d\n", INT_MIN - 1, INT_MAX + 1);
return 0;
}
Limits
For printf():
For scanf():
3.14 double
42 int
’c’ char
Numbering systems:
Mixing Types
Rule of thumb1:
Boolean Expressions