ExamVeda
Login
Home
Object Oriented Programming Using C Plus Plus
?

Which of the following is the insertion operator?

Answer & Solution
Correct Answer: Option B
The insertion operator in C++ is used to insert data into an output stream, such as cout.

Option A: >> - This is the extraction operator, used to extract data from an input stream, such as cin.

Option B: << - This is the insertion operator, used to insert data into an output stream, such as cout.

Option C: // - This denotes a single-line comment in C++.

Option D: / - This denotes the beginning of a multi-line comment in C++, which ends with /.

Option E: both (a) and (b) - This is incorrect because only Option B: << is the insertion operator.

Therefore, the correct answer is Option B: <<.
Examveda
Question posted by Examveda
Community

Join the Discussion

1 Comment
The Best
The Best 7 years ago
i think the answer is A, because B is extraction operator