Important MCQ

cin reads data from the

Q.cin reads data from the

A) monitor
B) keyboard
C) printer
D) speaker
Correct Answer:
Option B
Detailed Explanation:
B) keyboard is correct. cin is an istream object used for keyboard input with >>. It can read multiple values separated by whitespace; getline reads a complete line including spaces.