Download presentation
Presentation is loading. Please wait.
Published byAgus Tedjo Modified over 5 years ago
1
Lecture 5 review At the beginning of a program, what is the value of fd after ‘fd = open(…);’ is executed? What is file no 0? What is file no 1? What is file no 2? Rewrite ‘cout << “abc”;’ using a system call Rewrite ‘fprintf(stderr, “%s”, str);’ using a system call. Give two ways to redirect standard input to a file “aaa” How to redirect standard error and standard output to the same file with cerr and cout not overwriting each other? Does execv erase the file descriptor table?
2
What can happen when we use cout and write (1) in the same program
What can happen when we use cout and write (1) in the same program? Will the order in the code be honored in the standard output file? Can we enforce the order?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.