Important MCQ

cout << "Hi\n" << "Bye"; prints

Q.cout << "Hi\n" << "Bye"; prints

A) HiBye
B) Hi Bye on one line
C) Hi and Bye on two lines
D) Error
Correct Answer:
Option C
Detailed Explanation:
C) Hi and Bye on two lines is correct. cout is an ostream object used for screen output with the insertion operator <<. Quoted text is printed literally, expressions are evaluated, and endl or \n starts a new line.