Different data - types used in C language

 In this I tell every thing about data-types in C language . So do not waste our time let's get's started. After reading this your all doubt about data-types get clear. 

We generally use three types of data-types in  C language that is Int Float Char . Let us  talk about each 

1.Int :Int as the name suggest is used to store integer data-types in C language . It is used  to store number like : 34,41 , etc.

2.float : It is used to store floating points number that in simple means decimal number .It store number like 2.3,4.3 ,etc.

3. Char : It is used to store single character in  C language . Like 'c' ,'d', etc.

Other than these we also have some more data - types . That we hardly use Like short int , long int ,double , long double ,etc.

Short Int: Like int it also store   integer but  2 bytes.

Long Int : Like int it also store  integer but use 4 bytes.

Double : Double is similar to float but it  store generally 8 bytes.

Long Double: There is no difference between double and long double it is just matter of bytes used it generally use 10 bytes.

Important:

How much  bytes does data -type is depends on machine you are using and compiler you are using .

                                                           Table 

            Data-types                                                            Symbol used

              Int                                                                             %d

             Float                                                                           %f

              char                                                                            %c

               Double                                                                       %lf

               Long Int                                                                     %ld

              Long Double                                                                 %Lf

             short Int                                                                             %d

These are the various symbols used in C language to take input and print output . We very careful about the symbols used . As these are case-sensitive .

  I hope you find this helpful in your work .

  Thanks for  reading 


No comments:

Post a Comment