0
13kviews
Explain nested structure with example.
1 Answer
written 8.4 years ago by |
Structure written inside another structure is called as nesting of two structures. Nested Structures are allowed in C Programming Language. We can write one Structure inside another structure as member of another structure
Example
struct date
{
int date;
int month;
int year;
};
struct Employee
{
char ename[20];
int ssn;
float salary;
struct date doj;
};
Here, struct date is passed as a member of struct employee. Hence, nested.