CPP Output Statement MCQ
Cpp MCQ- Home
- Tutorials
- Cpp
- Output Statement
- Multiple Choice Question
(1) Which of the following is insertion operator?
A) >>
B) <<
C) $$
D) &&
Explanation
Insertion operator is used with std::cout statement. This operator is represented by double opening angle brackets such as <<
(2) cout statement ends with.
A) colon
B) semicolon
C) dot operator
D) None of These
Explanation
cout is an output statement. It always ends with semicolon
(3) Which of the following are used in Format String with cout object ?
A) Text
B) Escape Sequence
C) Variable
D) Both a and b
Explanation
Format string may include plain text as well as escape sequences.
(4) How many times insertion operator can be used with cout object ?
A) One
B) Two
C) Three
D) Multiple
Explanation
Insertion operator can be used multiple time with cout object.
(5) Which of the following can be used with cout statement ?
A) Variable
B) Constant
C) Expression
D) All of These
Explanation
Cout object can print all of these on console device. It prints values of variable and constants. It prints expression result after evaluate it.
(6) Which of the following operator is used with cout object ?
A) ""
B) <<
C) >>
D) ""
Explanation
Insertion operator is used with cout (see-out) object.