Memory Problems: buffer overflow enter 6 characters ("mypass") enter any 6 characters enter any 9 characters enter any 10 characters [run on jupiter] a at ffbefa2f and x at ffbefa38 Enter a pass word: mypass x = 1 Password is correct! ================================ #include /*checkpasstest.c*/ int checkpass(void); // prototype int main(void) { int x; x = checkpass(); // call function fprintf(stderr, "x = %d\n", x); // print the value of x if (x) // if x is not zero then fprintf(stderr, "Password is correct!\n"); else // x has been returned as a zero fprintf(stderr, "Password is not correct!\n"); return 0; } /*checkpass.c*/ #include #include int checkpass(void){ int x; char a[9]; // an array with 9 bytes allocated x = 0; // return value if x is not changed fprintf(stderr,"a at %p and\nx at %p\n", (void *)a, (void *)&x); printf("Enter a pass word: "); scanf("%s", a); // read a string from user if (strcmp(a, "mypass") == 0) // if a is equal to "mypass" x = 1; return x; } $ cc -o checkpasstest checkpasstest.c checkpass.c TRY IT!