C++ MCQs with answers Page - 5

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. Identify the correct extension of the user-defined header file in C++.

  • (A) .cpp
  • (B) .hg
  • (C) .h
  • (D) .hf

A

Admin • 833.24K Points
Coach

Q. Identify the incorrect constructor type.

  • (A) Friend constructor
  • (B) Default constructor
  • (C) Parameterized constructor
  • (D) Copy constructor

A

Admin • 833.24K Points
Coach

Q. C++ uses which approach?

  • (A) right -left
  • (B) Top-down
  • (C) left-right
  • (D) bottom -up

A

Admin • 833.24K Points
Coach

Q. Which of the following data type is supported in C++ but not in C?

  • (A) int
  • (B) bool
  • (C) double
  • (D) float

A

Admin • 833.24K Points
Coach

Q. Identify the correct syntax for declaring arrays in C++.

  • (A) array arr[10]
  • (B) array{10}
  • (C) int arr[10]
  • (D) int arr

A

Admin • 833.24K Points
Coach

Q. Size of wchat_t is.

  • (A) 2
  • (B) 4
  • (C) 2 or 4
  • (D) Depends on number of bits in system

A

Admin • 833.24K Points
Coach

Q. Which of the following is “address of operator”?.

  • (A) *
  • (B) &
  • (C) []
  • (D) &&

A

Admin • 833.24K Points
Coach

Q. identify the correct example for a pre-increment operator.

  • (A) ++n
  • (B) n++
  • (C) - -n
  • (D) +n

A

Admin • 833.24K Points
Coach

Q. Which of the following loops is best when we know the number of iterations?

  • (A) While loop
  • (B) Do while
  • (C) For loop
  • (D) All of the above

A

Admin • 833.24K Points
Coach

Q. Identify the scope resolution operator.

  • (A) :
  • (B) ::
  • (C) ?
  • (D) None