C++ MCQs with answers Page - 63

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 copies of a class static member are shared between objects of the class?

  • (A) A copy of the static member is shared by all objects of a class
  • (B) A copy is created only when at least one object is created from that class
  • (C) A copy of the static member is created for each instntiation of the class
  • (D) No memory is allocated for static members of a class

A

Admin • 833.24K Points
Coach

Q. Which looping process checks the test condition at the end of the loop?

  • (A) for
  • (B) while
  • (C) do-while
  • (D) no looping process checks the test condition at the end

A

Admin • 833.24K Points
Coach

Q. The default access level assigned to members of a class is ___________

  • (A) Private
  • (B) Public
  • (C) Protected
  • (D) Needs to be assigned

A

Admin • 833.24K Points
Coach

Q. Which of the following correctly describes the meaning of‘namespace’ feature in C++?

  • (A) Namespaces refer to the memory space allocated for names used in a program
  • (B) Namespaces refer to space between the names in a program
  • (C) Namespaces refer to packing structure of classes in a program.
  • (D) Namespaces provide facilities for organizing the names in aprogram to avoid name clashes.

A

Admin • 833.24K Points
Coach

Q. Which of the following correctly describes the meaning of ‘namespace’ feature in C++?

  • (A) Namespaces refer to the memory space allocated for names used in a program
  • (B) Namespaces refer to space between teh names in a program
  • (C) Namespaces refer to space between the names in a program
  • (D) namespaces provide facilities for organizing the names in a program to avoid name clashes

A

Admin • 833.24K Points
Coach

Q. Which of the following language is not supported by C++?

  • (A) Namespaces
  • (B) Operator Overloading
  • (C) Reflection
  • (D) Exception Handling

A

Admin • 833.24K Points
Coach

Q. class derived: public base1, public base2 { } is an example of

  • (A) Polymorphic inheritance
  • (B) Multiple inheritance
  • (C) Multilevel inheritance
  • (D) Hierarchical inheritance

A

Admin • 833.24K Points
Coach

Q. How do we declare an ‘interface’ class?

  • (A) It is not possible to create interface class in C++
  • (B) By declaring the class as interface with the keyword ‘interface’
  • (C) By making all the methods abstract using the keyword ‘abstract’ in a class
  • (D) By making all the methods pure virtual in a class

A

Admin • 833.24K Points
Coach

Q. How do we declare an abstract class?

  • (A) It is not possible to create abstract classes in C++
  • (B) By declaring the class abstract with the keyword ‘abstract’
  • (C) By declaring at least one method abstract using the keyword ‘abstract’ in a class
  • (D) By providing at least one pure virtual method (function signature followed by ==0;) in a class

A

Admin • 833.24K Points
Coach

Q. Which of the following is not an advantage of secondary memory

  • (A) It is easily portable
  • (B) It has highest speed
  • (C) It has large storage capacity
  • (D) It is cost-effective

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