Untitled
// Online C compiler to run C program online #include <stdio.h> #include <stdlib.h> struct adrs{ char city[25]; char state[25]; }a[10]; struct emp{ int eid; char name[25]; char desig[25]; int bsal; struct adrs a[10]; }e[10]; void main() { int n; scanf("%d",&n); for (int i=0;i<n;i++){ scanf("%d %s %s %d %s %s",&e[i].eid,e[i].name,e[i].desig,&e[i].bsal,e[i].a[i].city,e[i].a[i].state); } for (int i=0;i<n;i++){ printf("%d %s %s %d %s %s",e[i].eid,e[i].name,e[i].desig,e[i].bsal,e[i].a[i].city,e[i].a[i].state); } }
Leave a Comment