C Data Types

The type or data type of a variable determines the set of values that a variable can take. The data type can be broadly classified as follows:

Classification of data types in C

Data TypeDescription
Primitive/Basic data type/Primaryint
char
float
double
Derived data typearray
function
pointer
User-defined data typestructure
union
enumeration
Valuelessvoid

C language provides standard set of data types which is also known as “primitive” types. Other complex data types can be built using theses basic types. C has five basic data types and they are as follows:

Primitive / Basic Data type

Data typeKeyword
characterchar
integerint
floating pointfloat
double precision floating pointdouble
valuelessvoid