Home : C Language : Variables : Types
The following basic variable types are recognised:
Type | Bytes | Range | |||
[signed ] |
char |
1 | -128 | to 127 | |
unsigned |
char |
1 | 0 | to 255 | |
[signed ] |
int |
2/4 | 2 bytes on DOS and 16-bit Windows systems, 4 bytes on 32-bit Windows systems | ||
unsigned |
int |
2/4 | |||
[signed ] |
short |
[int ] |
2 | -32,768 | to 32,767 |
unsigned |
short |
[int ] |
2 | 0 | to 65,535 |
[signed ] |
long |
[int ] |
4 | -2,147,483,648 | to 2,147,438,647 |
unsigned |
long |
[int ] |
4 | 0 | to 4,294,967,295 |
float |
4 | 3.4 x 1038 | 7 digits of precision | ||
double |
8 | 1.8 x 10308 | 15 digits of precision | ||
long
double |
10 | 1.2 x 104932 | 19 digits of precision | ||
void |
0 | no value; used to specify that a function doesn't return any value, or that it has no parameters. |