Data Types in c

C Data Types are used to define the type of data that is to be stored. C data types can be classified into 4 groups:

● Basic Data Types:

  1. Integer
  2. Float
  3. Double
  4. Character

● Derived Data Types:

  1. Array
  2. Pointer
  3. Structure
  4. Union

● Enumeration Data Types:

  1. Enum

●  Void Data Types:

  1. Void

Basic Data Types:

 Integer: All the non-decimal numbers are called as Integers. Various forms of integers are listed below.

Data TypesSIZE (Byte)

For 32 bit

short2−32,768 to 32,767
signed short2−32,768 to 32,767
unsigned short20 to 65,535
int2−32,768 to 32,767
signed int2−32,768 to 32,767
unsigned int20 to 65,535
short int2−32,768 to 32,767
signed short int2−32,768 to 32,767
unsigned short int20 to 65,535
long int4-2,147,483,648 to 2,147,483,647
signed long  int4-2,147,483,648 to 2,147,483,647
unsigned long int40 to 4,294,967,295


Float represents all the decimal and exponential numbers. The float size is of 4 bytes.


Double also represents all the decimal and exponential numbers. Various forms of double are listed below.

Data TypesSIZE (Byte) For 32 bit
long double10


Various forms of characters are listed below.

Data TypesSIZE (Byte)RANGE
char1−128 to 127
signed char1−128 to 127
unsigned char10 to 255



void main()
printf ("For 64 bit architecture\n");
printf ("\nSize of int: %d", sizeof(int));
printf ("\nSize of short: %d", sizeof(short));
printf ("\nSize of short int: %d", sizeof(short int));
printf ("\nSize of long int: %d", sizeof(long int));
printf ("\nSize of char: %d", sizeof(char));
printf ("\nSize of float: %d", sizeof(float));
printf ("\nSize of double: %d", sizeof(double));
printf ("\nSize of long double: %d", sizeof(long double));


For 64 bit architecture                                                                                                                
Size of int: 4                                                                                                                         
Size of short: 2                                                                                                                       
Size of short int: 2                                                                                                                   
Size of long int: 8                                                                                                                    
Size of char: 1                                                                                                                        
Size of float: 4                                                                                                                       
Size of double: 8                                                                                                                      
Size of long double: 16
Content Protection by
Please Share