C++ MCQs with answers Page - 48

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. The keyword volatile is used to declare

  • (A) Objects that can be modified outside of a program control
  • (B) Absence of a type
  • (C) A member function that is defined in a subclass
  • (D) All of these

A

Admin • 833.24K Points
Coach

Q. In C language, the break statement causes an exit

  • (A) Only from the innermost switch
  • (B) Only from the innermost loop
  • (C) From all loops and switches
  • (D) From the innermost loop or switch

A

Admin • 833.24K Points
Coach

Q. In a for loop with a multi-statement, loop body semicolons should appear

  • (A) The test expression
  • (B) Each statement within the loop body
  • (C) The closing brace in a multi-statement loop body
  • (D) Both (a) and (b)

A

Admin • 833.24K Points
Coach

Q. The library function exit( ) causes an exit from

  • (A) The program in which it occurs
  • (B) The function in which it occurs
  • (C) The block in which it occurs
  • (D) The loop in which it occurs

A

Admin • 833.24K Points
Coach

Q. The dot operator connects which of the following two entities?

  • (A) Class member and class object
  • (B) Class object and a class
  • (C) Class and member of that class
  • (D) Class object and member of that class

A

Admin • 833.24K Points
Coach

Q. The function bad( ) is declared in the header file

  • (A) <stdlib.h>
  • (B) <math.h>
  • (C) <stdio.h>
  • (D) <iostream.h>

A

Admin • 833.24K Points
Coach

Q. In C++, a function contained within a class is called

  • (A) Member function
  • (B) A method
  • (C) A class function
  • (D) None of these

A

Admin • 833.24K Points
Coach

Q. Element double array [7] is which element of the array?

  • (A) Sixth
  • (B) Seventh
  • (C) Eighth
  • (D) Impossible

A

Admin • 833.24K Points
Coach

Q. Who developed Linux?

  • (A) Linus Pauling
  • (B) Linus Torvalds
  • (C) Both A & B
  • (D) None of these

A

Admin • 833.24K Points
Coach

Q. Which of the following type of class allows only one object of it to be created?

  • (A) Friend class
  • (B) Singleton class
  • (C) Abstract class
  • (D) Virtual class

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ