Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What\'s the error in this code ? typedef struct { char name[20] ; char sID[10] ;

ID: 3661284 • Letter: W

Question

What's the error in this code ?


typedef struct {
char name[20] ;
char sID[10] ;
char sadress [20] ;
char rcourses[5][20];} STD ;
typedef struct {
char cname [10][20]={"programming","computing", "calculas","quran","hadith","english","physics","chemmestry","mathmatic","geography"};
int cID ={1,2,3,4,5,6,7,8,9,10};
int nrs = 0;} course ;
FILE *stdf = fopen ("f:\IUG\ programming c lab \ final project\stdf.dat","rb+");
STD emp ={"","","",{"","","","",""}};
char menu (){
printf ( " Login Menu " ) ;
printf ( " A - System Admin " );
printf ( " S - Student " ) ;
printf ( " X - Exit " ) ;
printf ( " What's your choice ? " ) ;
}
int main() {
int i ;
for (i=0;i<50;i++)
fwrite (&emp,sizeof(STD),1,stdf)
char mc;
menu();
do {
printf(" ");
mc = getchar();
switch (mc) {
case 'a':
case 'A': admin (stdf,emp) ;
break;
case 'S':
case 's': student();
break;
case 'X':
case 'x': printf(" : see you later ;) ");
return 0;
default: printf(" : Choice nonexist ! ");
}
} while (1);
return 0;
}

Explanation / Answer

while(1) should use in above line

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote