C++ MCQ Questions and Answers

Practice Mode
Showing 10 of 93 questions
Q11
Which of the following is the boolean operator for logical-and?
  • A &
  • B &&
  • C |
  • D |&
Answer: Option B
Q12
Evaluate !(1 && !(0 || 1)).
  • A TRUE
  • B FALSE
Answer: Option A
Q13
Identify the correct statement
  • A Programmer can use comments to include short explanations within the source code itself.
  • B All lines beginning with two slash signs are considered comments.
  • C Comments very important effect on the behaviour of the program
  • D both
Answer: Option B
Q14
The directives for the preprocessors begin with
  • A Ampersand symbol (&Wink
  • B Two Slashes (//)
  • C Number Sign (#)
  • D Less than symbol (<Wink
Answer: Option C
Q15
The file iostream includes
  • A The declarations of the basic standard input-output library.
  • B The streams of includes and outputs of program effect.
  • C Both of these
  • D None of these
Answer: Option A
Q16
There is a unique function in C++ program by where all C++ programs start their execution
  • A Start()
  • B Begin()
  • C Main()
  • D Output()
Answer: Option C
Q17
Every function in C++ are followed by
  • A Parameters
  • B Parenthesis
  • C Curly braces
  • D None of these
Answer: Option B
Q18
Which of the following is false?
  • A Cout represents the standard output stream in c++.
  • B Cout is declared in the iostream standard file
  • C Cout is declared within the std namespace
  • D None of above
Answer: Option D
Q19
Every statement in C++ program should end with
  • A A full stop (.)
  • B A Comma (,)
  • C A Semicolon (Wink
  • D A colon (Smile
Answer: Option C
Q20
Which of the following statement is true about preprocessor directives?
  • A These are lines read and processed by the preprocessor
  • B They do not produce any code by themselves
  • C These must be written on their own line
  • D They end with a semicolon
Answer: Option D
Questions and Answers for Competitive Exams Various Entrance Test