Data types are used to inform which type of data we want to store or process. int is one data types is present in c. int data type is used when we want to store integer data. It does not allow us to store fractional values.
Syntax declaration of the int data type variable as follows
datatype variablename;
Ex:
int number;
int id;
Size of the int is 2 bytes. It means the the memory allocated for int variable is 2 bytes. The range of the
int is -32,768 to 32,767 if the int size is 2 bytes.
The range of the int is -2,147,483,648 to 2,147,483,647 if the int size is 4 bytes. We can check the size
of the data type or variable using special operator sizeof .
C is machine dependant programming language. Hence the data types are not fixed. The size depends on the machine.