How to store the elements and display??
struct A{
int level;
char name[20];
struct b *a_b;
}*d[3];
struct b {
char name[20];
struct b *next;
};
That material is covered by any basic course in C. Do a Google search and/or check your course notes.
this is quite easy you can access the elements through double dots or we can say through member access specifier i.e. example
the inner structure can access value by
struct address
{
element1;
element2;
};
struct emp
{
element3;
struct address b1;
};
main()
{
struct emp e={"element1,element2,element3"};
e.b1.element1;// this is the way we can access
}
for further refernce visit: Click Here
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.