List of all data types in C programming

In the series of learning programming, we learned about data types. Data type is a system for defining various properties of data stored in memory. Properties such as, type of data, range of data, bytes occupied etc.

Data type in C programming is categorized three categories.

  1. Primitive data type
  2. Derived data type
  3. User defined type

Read more – List of all format specifiers in C

Below is the list of all primitive and derived type in C programming.

List of primitive and derived data type in C

Data typeSizeRangeDescription
char1 byte-128 to 127A character
signed char
unsigned char1 byte0 to 255A character
short2 bytes−32,767 to 32,767Short signed integer of minimum 2 bytes
signed short
signed short int
unsigned short2 bytes0 to 65,535Short unsigned integer of minimum 2 bytes
unsigned short int
int2 or 4 bytes-32,768 to 32,767 or -2,147,483,648 to 2,147,483,647An integer (Both positive as well as negative)
signed int
unsigned int2 or 4 bytes0 to 65,535 or 0 to 4,294,967,295An unsigned integer (Positive integer)
long4 bytes-2,147,483,648 to 2,147,483,647Long signed integer of minimum 4 bytes
signed long
signed long int
unsigned long4 bytes0 to 4,294,967,295Long unsigned integer of minimum 4 bytes
unsigned long int
long long8 bytes-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807Integer with doubled capacity as of long
long long int
signed long long
signed long long int
unsigned long long8 bytes0 to 18,446,744,073,709,551,615Unsigned integer with doubled capacity as of long
unsigned long long int
float4 bytes1.2E-38 to 3.4E+38Single precision floating point number
double8 bytes2.3E-308 to 1.7E+308Double precision floating point number
long double12 bytes3.4E-4932 to 1.1E+4932Double precision floating point number

Important note: Size and range of data type is compiler dependent which may vary.

Read more –