Nested structures in c is a structure within structure.We can declare one structure inside the another structure in the same way structure members also declared inside structure.
Example:- 1)For example two structures one is College (outer structure)another is student(inner strcuture). 2)College has some data members like college_id,college_code,college_name. 3)Student has some data members like student_pin,student_name,student_age etc.. 4)The student structure is nested within the college structure Struct College { Data_member1; Data_member2; Struct Student { Data_member1; Data_member2; }; }; Syntax for accessing the data members of nested structure: Outer_structure_var_name.Inner_structure_var_name.data_member
Program.c
Enter name: Cprogram Enter age: 34 Enter street: Belllabaratories Enter city: america Enter state: america Person Information: Name: Cprogram Age: 34 Address: Belllabaratories, america, america
With supporting text below as a natural lead-in to additional content.