Unit1 Data Types
Unit1 Data Types
Unit1 Data Types
DATA TYPES
Data type determines the possible values that an identifier can have and the valid
operations that can be applied on it.
In C language data types are broadly classified as:
1. Basic data types(Primitive data types)
2. Derived data types
3. User-Defined data types
1. Basic data types:
There are five basic data types:
(i)Character - char
(ii)Integer - int
(iii)Single-Precision floating point - float
(iv)Double Precision floating point - double
(v)No value available - void
Data types and their memory requirements
1
CP8151 – Unit 1
Type qualifier
A type qualifier is used to indicate the special properties of data within an object. It
never affects the range of values & the arithmetic properties of the declared object.
Two type qualifiers available in C are:
Const qualifier: Object value will not be changed during the execution of a
program
Volatile qualifier
Type Modifiers
A type modifier modifies the base type to yield a new type. It modifies the range and the
arithmetic properties of the base type.
Type modifiers and the corresponding keywords available in C are:
Signed (signed)
Unsigned (unsigned)
Short (short)
Long (long)