// experiment 9 // cricketer #include struct datedebut { int date; int month ; int year; }; struct cricketer // in these type of problem struct date debut must be defined earlier i.e. sequentially { char name[20]; int age; struct datedebut dd; int tstmtchplyd;//test matches played int runs; }; int main() { struct cricketer cricket[20];// an array cricket data type struct int loop; for(loop=0;loop<20;loop++) // input Element { printf("Name : "); scanf("%s",cricket[loop].name); printf(" Age : "); scanf("%d",&cricket[loop].age); printf("Date of Debut "); scanf("%d-%d-%d",&cricket[loop].dd.date,&cricket[loop].dd.month,&cricket[loop].dd.year); printf("Test Match Played"); scanf("%d",&cricket[loop].tstmtchplyd); printf("\n Runs : "); scanf("%d",&cricket[loop].runs); } for(loop=0; loop<20 ; loop++) { puts(cricket[loop].name); printf("Age : %d ",cricket[loop].age); printf("Date Of debut :%d-%d-%d",cricket[loop].dd.date,cricket[loop].dd.month,cricket[loop].dd.year); printf("Matches Played : %d",cricket[loop].tstmtchplyd); printf("Runs : %d",cricket[loop].runs); printf("\n\n"); } }