C Programming – Data Types

 

c-logo

 

All programming language deal with some data and ‘ C ‘ is one of them. For instance, to solve any mathematical expression it require integer or real numbers . To print any message it requires character or string.C has a good varieties of data types that are categorized into three types:

a) Primitive Data Types ( char,int,float,double,void)

b) Derived Data Types ( array,pointer,function)

c) User Defined Data Types (enum,structure,union)

 

 

Primitive Data Types are further grouped on the basis of its application

For Interger Numbers – int

For Characters – char

For Real Numbers – float or double

 

 

Primitive Data Type                     Size in Byte                       Format Specifier

     

       int                                              2                                             %d

       char                                           1                                             %c

       float                                           4                                             %f

       double                                        8                                             %lf

 

1 Byte = 8 bits

 

If you have any queries in any part , do leave us a comment.