[solved]-106 Output Following Program Include Csapph 4 Int Main Int Fdi Fd2 Fd1 Open Footxt Ordonly Q39070740
Answer to 10.6 please
10.6 What is the output of the following program? #include “csapp.h” 4 int main() { int fdi, fd2; fd1 = Open(“foo.txt”, O_RDONLY, 0); fd2 = Open(“bar.txt”, O_RDONLY, 0); Close(fd2); fd2 = Open (“baz.txt”, O_RDONLY, 0); printf(“fd2 = %dn”, fd2); – exit(0); 13 ] • 9.15 9.19 • 10.6, Assume that no files have been opened before the program began, other than the streams (0-2) that are avail- able to every process. Show transcribed image text 10.6 What is the output of the following program? #include “csapp.h” 4 int main() { int fdi, fd2; fd1 = Open(“foo.txt”, O_RDONLY, 0); fd2 = Open(“bar.txt”, O_RDONLY, 0); Close(fd2); fd2 = Open (“baz.txt”, O_RDONLY, 0); printf(“fd2 = %dn”, fd2); – exit(0); 13 ]
• 9.15 9.19 • 10.6, Assume that no files have been opened before the program began, other than the streams (0-2) that are avail- able to every process.
Expert Answer
Answer to 10.6 What is the output of the following program? #include “csapp.h” 4 int main() { int fdi, fd2; fd1 = Open(“foo.txt”, … . . .
OR

