Structure within Structure (Nested Structure) C Programming Home » C Structures » Structure within Structure #include #include struct str1 //first Structure { int id; struct str2 // Second Structure { char name[20]; }obj1; }obj2; int main( ) { obj2.id=1001; strcpy(obj2.obj1.name, "Bintu Chaudhary"); printf("\nStructure within Structure\n\n"); printf( "\nID. : %d", obj2.id); printf( "\nName : %s", obj2.obj1.name); getch(); } } Output is as : Read more » Tweet Share Share Share Share Related Post
ConversionConversion EmoticonEmoticon