With few changes you can improve the code. You need to replace gets() and strcmp() with the similar ones bur more safe.
I need help with the strcmp portion.
int pass_flag = 0;
printf(“n Enter the password : n”);
printf (“n Wrong Password n”);
printf (“n Correct Password n”);
pass_flag = 1;
/* Now Give root or admin rights to user*/
printf (“n Root privileges given to the user n”);