2. A variable's data type determines the values
that the variable can contain and the
operations that can be performed on it.
Every variable must have a data type.
C supports several different types of data.
3.
4. Data Type Size in Bytes Range Use
char 1 –128 to 127 To store characters
int 2 –32768 to 32767 To store integer numbers
float 4 3.4E–38 to 3.4E+38 To store floating point numbers
double 8 1.7E–308 to 1.7E+308 To store big floating point numbers
5. The (typedef) feature allows users to define
new data types that are equivalent to existing
data types.
Once a user - defined data type has been
established the new variables, arrays,
structures etc., can be declared in terms of
this new data types
6. typedef int age;
age male, female;
In this declaration age is a user-defined data type,
which is equivalent to type int.
age male, female;
is equivalent to writing
int male, female;
7. An enumerated is a user defined data type like a
structure ( or ) a union .
Its members are constants that are written as
identifiers though they have signed integer
values.
An enumeration may be defined
Syntax:
enum tag { member1 , members2 , .. member m} ;