nested structure in c


Structure within Structure( Nested Structure )

When a structure contains another structure, it is called nested structure.
Syntax :

struct typename-1
{
data Members
– – – – – – –
struct typename-2
{
data members
– – – – – – – —
} variable;

}variable;

Example Program :

create struct student display record of student name and date of birth, which is in dd/mm/yyyy format and those memers are placed in other structure which inside in student structure..

Source Code

Output of Nested Structure Example Programe

Enter Name and Birthdate
Bharat
15 8 1947
Name = Bharat
Date of Birth = 15/8/1947

(Visited 48 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *


CAPTCHA Image
Reload Image