Data
types in C:
Data type specifies the type of data that can be stored in variable.

Basic Data Types in C:
1.Integer
Float/Real
data type:
Data type specifies the type of data that can be stored in variable.
Basic Data Types in C:
1.Integer
2.Float
3.Double
Integer
data type:
- Represented by int.
- e.g int a;
- Int occupies 2 bytes.
- 16 bits.
- 216=65536
- Range of integer(-32768-0-32767)
Integer
qualifiers:
Range of int can be changed using qualifiers.
- Short int (2 bytes)
- Long int (4 bytes)
- Unsigned int (2 bytes, +ve values only)
- (0-65535)
- Unsigned long int (4 bytes, +ve values only)
- (0-232-1)
1.Represented by float.
e.g
23.26,23.27,0.01 etc
2.4 bytes(32 bits)
Double
data type:
1.Represented by double.
2.Used to store large real data values.
3.8 bytes
4.One qualifier
5.Long double (10 bytes)
Character
data type:
1.
Represented by char
2.1 byte
No comments:
Post a Comment