
496 Programming in C
13.4 structure wIthIn structure
We can take any data type for declaring structure
members like int, float, char. In the same
way, we can also take objects of one structure as a
member in another structure. Thus, a structure within
a structure can be used to create complex data appli-
cations (see Figure 13.2). The syntax of the structure
within the structure is as follows:
struct time
{
int second;
int minute;
int hour;
};
struct t
{
int carno;
struct time st;
struct time et;
};
struct t player;
13.5 Write a program to read and display the car
number, starting time and reaching time.
Use structure within ...