0
587views
What is Nesting of Structure (Structures within Structures )

Subject : Structured Programming Approach

Title : Arrays, String, Structures and Union

Marks : 4M

1 Answer
0
0views

Structures within structures mean nesting of structures. Nesting of structures is permitted in C. Let us consider the following structure defined to store information about the salary of employees. We can group all items related to allowance together and declare them under a substructure as shown below:

struct salary 
{ 
char name[20]; 
char department[10]; 
struct 
{ 
int dearness; 
int house_rent; 
int city; 
} 
allowance; 
} 
employee;
Please log in to add an answer.