⚙️ C++ Programming MCQs and Exam Questions

Practice 184 approved ⚙️ C++ Programming MCQs and exam questions from the 💻 Programming subject.

184 solved MCQs

Which is represented from high level to low level in C++, COBOL, JAVA etc.?Answer: Software Which of the following type of class allows only one object of it to be created?Answer: Singleton class Which of the following is not a type of constructor?Answer: Friend constructor Which of the following statements is correct?Answer: Derived class pointer cannot point to base class. Which of the following is not the member of class?Answer: Friend function Which of the following concepts means determining at runtime what method to invoke?Answer: Dynamic binding Which of the following term is used for a function defined inside a class?Answer: Member function Which of the following concept of oops allows compiler to insert arguments in a function call if it is not specified?Answer: Default arguments How many instances of an abstract class can be created?Answer: 0 Which of the following cannot be friend?Answer: Object Which of the following concepts of OOPS means exposing only necessary information to client?Answer: Data hiding Why reference is not same as a pointer?Answer: All of the above. cout is a/an __________ .Answer: object Which of the following concepts provides facility of using object of one class inside another class?Answer: Composition How many types of polymorphisms are supported by C++?Answer: 2 Which of the following is an abstract data type?Answer: Class Which of the following concepts means adding new components to a program as it runs?Answer: Dynamic loading Which of the following statement is correct?Answer: A constructor is called at the time of declaration of an object. Which of the following statement is correct?Answer: A constructor is called at the time of declaration of an object. Which of the following correctly describes overloading of functions?Answer: Ad-hoc polymorphism Which of the following approach is adapted by C++?Answer: Bottom-up Which of the following is correct about function overloading?Answer: Both A and B. Which of the following is correct about class and structure?Answer: class data members are private by default while that of structure are public by default. Which of the following concepts means wrapping up of data and functions together?Answer: Encapsulation Which of the following concepts means waiting until runtime to determine which function to call?Answer: Dynamic binding How "Late binding" is implemented in C++?Answer: Using Virtual tables Which of the following operator is overloaded for object cout?Answer: << Which of the following is the correct class of the object cout?Answer: ostream Which of the following cannot be used with the keyword virtual?Answer: constructor Which of the following functions are performed by a constructor?Answer: Initialize objects