MCQ - OOPS Concept in C++ Programming
13.Which of the following access specifier is used as a default in a class definition?
14.Not using virtual destructor feature in a C++ object oriented programing can cause
Explanation:Virtual destructor is used to maintain the hierarchy of destructor calls for polymorphic classes in inheritance. If we don’t use it then it may cause resource leak or memory leak.
15. If private member functions are to be declared in C++ then __________
Explanation:The private members doesn’t have to have the keyword with each private member. We only have to specify the keyword private followed by single colon and then private member’s are listed.
16.The order in which operands are evaluated in an expression is predictable if the operator is
Explanation:The order in which operands are evaluated in an expression is not defined by the language and is compiler-dependent. For example, pop ( ) - pop ( ) may do (current top stack) - (the data just below the current top), or vice-versa, depending on which pope ) call is executed first. However, the order of evaluation for the operator & & is defined by the language. It evaluates from left to right. Do not confuse order of evaluation with associativity.
17.Which of the following is a mechanism of static polymorphism?
18.IS A relationship in C++ is
Also check :