/* Program 1: -statically define two strings: a name and a password. -ask the user for the password -check if the password is correct */ #include #include #include #define N 50 void main() { //define the name and pw char name[N] = "shane"; char pw[N] = "apple"; char pwguess[N]; //get pw from user printf("enter password for %s", name); scanf("%s", pwguess); //check the password if(strcmp(pwguess, pw) == 0) { printf("password correct\n"); } else { printf("incorrect password\n"); } system("pause"); }