Important MCQ

Which statement is correct?

Q.Which statement is correct?

A) cout < "Hello";
B) cout << "Hello";
C) cout >> "Hello";
D) cout = "Hello";
Correct Answer:
Option B
Detailed Explanation:
B) cout << "Hello"; 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.