C++ MCQs with answers Page - 90

Here, you will find a collection of MCQ questions on C++. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. How many loops are there in C++ 98?

  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 4

A

Admin • 833.24K Points
Coach

Q. Which version of C++ introduced keyword - constexpr?

  • (A) C++0x
  • (B) C++1z
  • (C) C++11
  • (D) C++20

A

Admin • 833.24K Points
Coach

Q. C++ 17 is also known as ___

  • (A) C++ 98
  • (B) C++ 0x
  • (C) C++ 1z
  • (D) C++ 11

A

Admin • 833.24K Points
Coach

Q. What is the output of below program?

Code:
int main()
{
if(-1 == -1){
cout<<"Hey..";
}
else{        cout<<"mcqbuddy.com";
}

return 0;
}

  • (A) Hey..
  • (B) mcqbuddy.com
  • (C) Compilation Error
  • (D) None of these

A

Admin • 833.24K Points
Coach

Q. Which keyword is used to write Assembly code within a C++ program?

  • (A) asm
  • (B) ASM
  • (C) Compiler specific
  • (D) Not possible

A

Admin • 833.24K Points
Coach

Q. Which of the following is the least safe type casting in C++?

  • (A) dynamic_cast
  • (B) reinterpret_cast
  • (C) const_cast
  • (D) static_cast

A

Admin • 833.24K Points
Coach

Q. Which of the following is Right Shift operator?

  • (A) >>
  • (B) ->
  • (C) <<
  • (D) <

A

Admin • 833.24K Points
Coach

Q. What is the latest version of C++?

  • (A) C++ 03
  • (B) C++ 11
  • (C) C++ 14
  • (D) C++ 17

A

Admin • 833.24K Points
Coach

Q. Are both of the preprocessor directives solving same purpose?

Code:
#include <iostream.h>

#include "iostream.h"
  • (A) Yes
  • (B) No
  • (C) Depends on compiler
  • (D) None of these

A

Admin • 833.24K Points
Coach

Q. Car contains Engine. Which type of relationship is it?

  • (A) IS-A relation
  • (B) HAS-A relation
  • (C) Both A and B
  • (D) None of these