|
C Data types
Type Name |
Memory Used |
Size Range |
Precision |
short int |
2 bytes |
-32,767 to 32,767 |
Not applicable |
int |
4 bytes |
-2,147,483,647 to 2,147,483,647 |
Not applicable |
long int |
4 bytes |
-2,147,483,647 to 2,147,483,647 |
Not applicable |
float |
4 bytes |
aproximately 10^-38 to 10^38 |
7 digits |
double |
8 bytes |
aproximately 10^-308 to 10^308 |
15 digits |
long double |
12 bytes |
aproximately 10^-4932 to 10^4932 |
19 digits |
char |
1 byte |
All ASCII characters |
Not applicable |
bool |
1 byte |
true, false |
Not applicable |
|
|
|
|
Syntax
Type_Name Variable_Name, Variable_Name_2, . . .;
Example
short int shortNumber;
float floatNumber;
char letter = 'a';
|