Question 7
Back to Exercise
What does std::cin >> std::ws do?
- A Writes a space
- B Extracts and discards all leading whitespace Correct
- C Sets the field width
- D Waits for a key press
Correct Answer: Option B
std::ws is an input manipulator that consumes whitespace (including newlines) up to the next non-space character.
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!