Multiple choice

Which of the following is correct with respect to the statements given below? A. Strings that do not contain blank spaces can be read by cin. B. cin only reads a character.

  1. Only A

  2. Only B

  3. A is true and B is false

  4. A is false and B is true

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The cin statement can read only the strings without blank spaces and cin can read any type of values. Hence, statement A is true but B is false.