Data Types in C Language with Examples

Data Types in C Language with Examples


C language is enriched in data types. Let us discuss them one by one.

int


int data type is for declaring a variable's data type as integer type.

Suppose you wants to store number of items in a variable, as all of us know count of items is always in integer form, i.e. no decimal part. We can declare such variable as int type.

Example
int qty;
float
float data type is for declaring a variable's data type as real.
char


char data type is for declaring a variable's data type as character type.