There are two possible sources of questions:
At this point in the class, most questions on the quiz will of necessity be definitional. Here are some examples. I'll ask at least one question from among the following.
Say the user runs a.out outfile. Assuming that close() and open() successfully complete, what does this program accomplish? Explain why.#include <stdio.h> #include <unistd.h> #include <fcntl.h> int main(int argc, char **argv, char **envp) { int fd; close(1); fd = open(argv[1], O_WRONLY | O_CREAT, 0600); printf("%d\n", fd); return 0; }