Add

Friday, November 16, 2018

Data types used in c program and int


Data types used in c program

1- integer variable Int
2- character variable
Char
3- floating point variables
Float
4- Enumerator
Enum
5- class
Class
6- string
Char []



int

This data type is used to save integer values

E.g. 2, 25 ,567 etc.
C++ compiler use 4 bytes to save int
In old compilers int was of 2 bytes so its range was -32767 – 32768
It comes in three values, int, short int, long int
Length of data depends on compiler, but short int is at least 2 bytes and long int is at least 4 bytes


No comments:

Post a Comment