C++20 sections · 1024 units
Open in CourseQuiz: Basic Input
Test your understanding
Check Your Understanding
What happens when user types 42 cats for int x; cin >> x;?
- A.
xbecomes42catsas a string - B.
xbecomes42, buffer is empty - C.Input fails because of the letters
- D.
xbecomes42,catsstays in buffer