0
13kviews
Explain nested structure with example.
1 Answer
0
1.4kviews

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.

Please log in to add an answer.