Data Types in C Programming

Data Types in C Programming

Tech Knowledge Data Types in C Programming



Data Types
Type Format Specifier Value Range Storage Size(Bytes)
char %c -128 to 127 or 0 to 255 1
unsigned char %c 0 to 255 1
signed char %c -128 to 127 1
int %d -32,768 to 32,767 2
unsigned int %d 0 to 65,535 or 2
signed int %d -32,768 to 32,767 2
short int %hd -32,768 to 32,767 2
long int %ld -2,147,483,648 to 2,147,483,647 8
float %f 1.2E-38 to 3.4E+38 4
double %lf 2.3E-308 to 1.7E+308 8
long double %Lf 3.4E-4932 to 1.1E+4932 10

Comments