CS计算机代考程序代写 #include

#include
#include
#include

struct user {
char username[16];
char is_admin;
} u;

int main(int argc, char **argv) {
u.is_admin = ‘N’;
printf(“Hello, %s\n”, argv[1]);
strcpy(u.username, argv[1]);
printf(“Admin status: %c\n”, u.is_admin);
if(u.is_admin == ‘Y’) {
printf(“Hello admin!\n”);
system(“/bin/sh”);
} else {
printf(“Bye %s!\n”, u.username);
}
}