Question 15
Back to Exercise
How do std::cerr and std::clog differ?
- A cerr writes to a file
- B Both write to standard error; cerr is unbuffered, clog is buffered Correct
- C clog is for input
- D They are identical
Correct Answer: Option B
Unbuffered cerr guarantees error messages appear even if the program crashes right after; clog is more efficient for large amounts of log output.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!