Which of the following is the insertion operator?
A. >>
B. <<
C. //
D. /*
E. both (a) and (b)
Answer: Option B
Solution (By Examveda Team)
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: <<.
Join The Discussion
Comments (1)
Related Questions on Object Oriented Programming Using C Plus Plus
A. all thrown objects
B. no thrown objects
C. any thrown object that has not been caught by an earlier catch block
D. all thrown objects that have been caught by an earlier catch block
Format flags may be combined using
A. the bitwise OR operator (|)
B. the logical OR operator (||)
C. the bitwise AND operator (&)
D. the logical AND operator (&&)
E. None of the above

i think the answer is A, because B is extraction operator