#include #include #include #include #include /* static char *str1 = "OP1\n"; static char *str2 = "AB2\n"; */ char buf[1000]; int main() { // int f1; close(STDIN_FILENO); // f1 = open ("myjunk", O_RDWR | O_CREAT | O_TRUNC, 0777); open ("myjunk", O_RDWR, 0777); scanf("%s", buf); printf("after scanf buf = %s\n", buf); return 0; }