Program to illustrate the concept of use of an Array within the Structure C Programming Home » C Structures » Structure and array /* /*Program to illustrate the concept of use of an Array within the Structure*/ #include #include struct StrArr { char name[5]; char city[5]; }; void main() { struct StrArr n[5]; int i=1; printf("Enter the Ten Emp...\n"); for(i=1;i<=5;i++) { scanf("%s%s",n[i].name,n[i].city); } printf("\nAfter the Inputting"); for(i=1;i<=5;i++) { printf("\nName=%s",n[i].name); printf("\n City=%s",n[i].city); } getch(); } Read more » Tweet Share Share Share Share Related Post
ConversionConversion EmoticonEmoticon