For example,
typedef int age;
typedef float marks;
Here, ‘age’ is an integer type and ‘marks’ is a float type. Now they can be later used to declare
variables as follows:
age a1, a2;
marks m1, m2;
So now a1 and a2 are indirectly declared to be of type age only and age is of type integer, so a1
and a2 are also of type integers only.
Do'stlaringiz bilan baham: