Question: Describe this code in detail (only admin part, )Minimum 2 pages, which (only the admin part )-- must include comments in each line from the

Describe this code in detail (only admin part, )Minimum 2 pages,

which (only the admin part )--must include comments in each line from the given code in c

code

void Admin() { printf(" ****************************************************** \t\tWelcome Admin ******************************************************");

printf(" \t\tLogin ");

printf(" \t\tEnter Admin ID:"); gets(stdin); char id[10], pass[10]; scanf("%s", id); printf("\t\tEnter Password:"); scanf("%s", pass); char defid[10] = "POST", defpass[10] = "MALONE"; int val = strcmp(id, defid), val1 = strcmp(pass, defpass); if (val == 0 && val1 == 0) { printf(" \t\tLogin Success "); StudentInfo(); } else { printf(" \t\tWrong Input "); printf("\t\tRetry(Y/N):");

char y; scanf(" %c", &y); if (y == 'Y' || y == 'y') { printf(" "); Admin(); } else if (y == 'N' || y == 'n') { printf(" \t\tReturn to mainmenu or exit (M/E):"); char z; scanf(" %c", &z);

if (z == 'M' || z == 'm') { printf(" "); Mainmenu(); } else if (z == 'E' || z == 'e') { printf(" \t\t***Thank you!***"); } else { printf(" \t\tWrong Input "); printf("\t\tReturned from admin "); Mainmenu(); } } else { exit(1); } } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!