C Data Types

Data types in C refer to an extensive system used for declaring variables of different types. The type of a variable determines how much space it occupies in storage and how the bit pattern stored is interpreted.

The types in C can be classified as follows −

Size Of Data Types In C

The size of each data type is defined in bits or bytes (8 bits). Each data type in C is associated with a specific range of values defined as below: 

Data TypeFormat SpecifierMinimal RangeSize in bit
unsigned char%c0 to 2558
char%c-127 to 1278
signed char%c-127 to 1278
int%d, %i-32,767 to 32,76716 or 32
unsigned int%u0 to 65,53516 or 32
signed int%d, %i-32,767 to 32,767 (same as int)16 or 32
short int%hd-32,767 to 32,76716
unsigned short int%hu0 to 65,53516
signed short int%hdSame as short int16
long int%ld, %li-2,147,483,647 to 2,147,483,64732
long long int%lld, %lli-(2^63) to (2^63)-164
signed long int%ld, %liSame as long int32
unsigned long int%lu0 to 4,294,967,29532
unsigned longlong int%llu(2^63)-164
float%f1E-37 to 1E+37 along with six digits of the precisions 32
double%lf1E-37 to 1E+37 along with six digits of the precisions 64
long double%Lf1E-37 to 1E+37 along with six digits of the precisions 80

Leave a Comment