Monday, July 15, 2019

Data Type

Data Types:

data types



Their are several data types in c which is as follows.

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

1].Integer:
   
Integer data type allows a variable to store numeric values.
                   
“int” keyword is used to refer integer data type.The storage size of int data type is 2 or 4 or 8 byte.int (2 byte) can store values from -32,768 to +32,767.int (4 byte) can store values from -2,147,483,648 to +2,147,483,647.

2]Character:
           
Character data type allows a variable to store only one character.Storage size of character data type is 1. We can store only one character using character data type.“char” keyword is used to refer character data type.In c to store more than one character string is used.
         
3]Float:
           
Float data type allows a variable to store decimal values.Storage size of float data type is 4.We can use up-to 6 digits after decimal using float data type.

4]double:
           
Double data type is also same as float data type which allows up-to 10 digits after decimal.The range for double datatype is from 1E–37 to 1E+37.


EmoticonEmoticon