not mandatory for all the derived classes sanfoundry


b) No, only multilevel inheritance is used d) Exactly 3 View Answer. d) According to priority of

a) Classes may/may not have both data members and member functions b) Inheriting a class which can print all the calculation results c) There can be more than 2 independent classes involved in single inheritance View Answer, 3. View Answer, 14. To practice all areas of Object Oriented Programming (OOPs) using C++, here is complete set of 1000+ Multiple Choice Questions and Answers. 2011-2022 Sanfoundry. To practice all areas of Object Oriented Programming (OOPs) using C++, here is complete set of 1000+ Multiple Choice Questions and Answers.

View Answer. Which among the following is false, for a member function of a class? d) All languages support it c) Parent class 2011-2022 Sanfoundry. d) One derived class derives from another derived class b) Private d) Depends on access specifier and inheritance used a) Declaring existing class as sealed b) Class visibility modifiers (public,private etc.) b) size of a derived class object is sum of sizes of non static data members of base class and derived class View Answer. a) Functions declared and defined in base class a) True a) Inheriting a class which performs all the calculations Which constructor will be called first from the classes involved in single inheritance from object of derived class? a) Class and object If a base class is inherited from another class and then one class derives it, which inheritance is shown? c) Public View Answer, 14. 3.

b) Parent class objects 2011-2022 Sanfoundry. b) Private, protected, public, internal, protected internal

Which among the following is true? Which class can have member functions without their implementation? c) protected member View Answer, 15. a) Private d) Runtime error b) At least 2 Which of the following type of class allows only one object of it to be created? a) Mandatory for all the classes in program d) Loop View Answer, 7. b) Inherited Static methods cant be made abstract in java. c) 3 Single level inheritance will be best for___________ a) size of object depends on sizes of its non static data members Which of the following is not a type of constructor? a) Class A d) All of the mentioned a) Multiple d) It is correct d) As many as required Take Object Oriented Programming Practice Tests - Chapterwise! View Answer, 4. a) public member b) Abstract methods can be defined in derived class View Answer, 7. d) Language independency All Rights Reserved. View Answer, 11. Which is the correct way to create an object of the given class abc? a) Only 2 Which of the following statements is correct? a) Abstract functions should not be defined in all the derived classes a) Protected scope If base class contains 2 nested classes, will it be possible to implement single level inheritance? c) SmallTalk c) No, at least 2 undefined functions must be there View Answer, 3. Base class have ________________ of abstraction. b) False If single inheritance is used, program will contain ________________ Which language doesnt support single level inheritance? a) Garbage value d) It is class with maximum number of members

c) Public b) Inheritance cannot extend base class functionality a) 1 d) Declaring existing class as shadows View Answer, 12. Which programming language restricts the use of multiple inheritance? c) private View Answer, 2. c) Both class constructors at a time b) Use keyword base a) Single inheritance All Rights Reserved. IndiaBIX provides you lots of fully solved C++ Programming (OOPS Concepts) questions and answers with Explanation. b) Class B View Answer, 2. c) Derived class can still access them in multiple inheritance View Answer. View Answer. with full confidence. b) Class and structure d) All of the mentioned a) Runtime b) Polymorphism b) At most 2 classes All Rights Reserved. View Answer. Sanfoundry Global Education & Learning Series Object Oriented Programming (OOPs). a) At least 2 classes d) Cant be done a) Methods with same name creates ambiguity and conflict Which among the following must be in a base class? a) It must have different prototype in the derived class d) String Class c) While creating the object firstly constructor of class sample 1 will be called followed by constructor of class sample View Answer, 13. d) No, they must not contain constructors Which among the following is correct for abstract methods? b) Using seperate derived class Take Object Oriented Programming Practice Tests - Chapterwise! d) Depends on compiler

d) No, but we can call in some cases

Sanfoundry Global Education & Learning Series C# Programming Language. The abstract methods can never be ___________ in a base class. c) Member functions need not be declared inside the class definition View Answer, 5. View Answer, 7.

All students, freshers can download C++ Programming OOPS Concepts quiz questions with answers as PDF files and eBooks. View Answer, 2. View Answer, 10. View Answer, 10. d) Compile time error b) Derived class should be made abstract class c) No, because abstract classes doesnt have constructors

b) False 2011-2022 Sanfoundry.

b) There can be exactly 2 classes to implement single inheritance in a program c) Implements new functionality in derived class Which of the following is not type of class? Can we call methods of base class using the constructor of the derived class? The abstract method definition can be made ___________ in derived class.

d) Runs but gives random values as output

d) Abstract functions must be defined in all the derived classes c) Public

Which among the following is false for class features? Why does diamond problem arise due to multiple inheritance? d) Interpreting time d) At most 4 classes b) Member functions can be defined inside or outside the class body

Which are the correct statements about construction of object of class sample? a) Diamond b) Interfaces 1. a) We can derive a class from a base class even if source code of base class not available What is the scope of a class nested inside another class?

b) The constructor of only sample class will be called This set of Object Oriented Programming (OOPs) using C++ Multiple Choice Questions & Answers (MCQs) focuses on Single Level Inheritance.

a) It is parent of any of its derived class b) That is multilevel inheritance b) Derived class constructor If a function declared as abstract in base class doesnt have to be defined in derived class then ______ Class with main() function can be inherited. What would be the size of derived class object? b) Methods inherited from the superclass may conflict b) Final class a) There can be more than 2 classes in program to implement single inheritance Which members cant be accessed in derived class in multiple inheritance? d) It must have same return type only c) Different according to definition d) Not mandatory for all the derived classes View Answer, 2. c) Template class View Answer, 7.

Here you can find objective type C++ Programming OOPS Concepts questions and answers for interview and entrance examination. a) Using alias name View Answer, 6. d) Abstract class Reflections, Functions & Multithreaded Programming, here is complete set of 1000+ Multiple Choice Questions and Answers, Prev - C# Questions & Answers Enumerations, Next - C# Questions & Answers Inheritance Implementation, Object Oriented Programming using C++ Questions and Answers Types of Inheritance, C# Program to Demonstrate Multilevel Inheritance, Object Oriented Programming using C++ Questions and Answers Multiple Inheritance, Life Sciences Questions and Answers Quantitative Inheritance, Object Oriented Programming using C++ Questions and Answers Multilevel Inheritance, C# Program to Demonstrate Single Inheritance, Object Oriented Programming using C++ Questions and Answers Hierarchical Inheritance, Java Questions & Answers Inheritance 2, Object Oriented Programming using C++ Questions and Answers Single Level Inheritance, Object Oriented Programming MCQ Questions. Which of the following pairs are similar? How to make a derived class a base class? c) At most 2 c) Necessary for all the derived classes d) Minimum degree c) Value or Reference, depending on program Solved examples with detailed answer description, explanation are given and it would be easy to understand. How are abstract functions different from the abstract functions? In an inheritance chain through which of the following, the base class and its components are accessible to the derived class? d) Derive a class from derived class a) Multiple inheritance a) Error : same variable name cant be used twice View Answer, 4. a) Basic d) No, never d) The abstract functions must be defined either in base or derived class b) Necessary for all the base classes c) Exactly 2 classes View Answer, 4. View Answer, 6. View Answer, 9. d) 2 View Answer, 15.

1. d) Classes doesnt have any size b) Functions only declared in base class Which among the following is true? This set of Object Oriented Programming (OOPs) using C++ Multiple Choice Questions & Answers (MCQs) focuses on Classes. b) protected

View Answer. If a class is enclosing more than one class, than it can be called as base class of those classes. d) All of the mentioned

b) Protected

a) Derived class must define the function anyhow Sanfoundry Global Education & Learning Series Object Oriented Programming (OOPs). a) Use the existing functionality of base class b) Multiple inheritance c) Implementations View Answer, 8. a) Data members b) Compile time error c) class student{ public: student(int a){ } }; How many classes should a program contain to implement the multiple inheritance? d) static member What is this feature of enforcing definitions of abstract function at compile time called? View Answer, 14. View Answer, 6. b) Final Class c) Using virtual keyword with same name function c) Yes, if all the methods are predefined View Answer, 3. a) There wont be any use of multiple inheritance 1. c) Runtime error Sanfoundry Global Education & Learning Series Object Oriented Programming (OOPs). b) Compile time

View Answer, 9. The number of levels of inheritance are? View Answer, 14. Wrong statement about inheritance in C# .NET? a) Abstract methods can be static b) Multiple View Answer, 13. How many base classes can a derived class have which is implementing multiple inheritance? To practice all areas of C# language, here is complete set of 1000+ Multiple Choice Questions and Answers. d) No, since constructors wont be there View Answer, 2. d) Java b) student class{ }; d) The derived class must implement all the abstract method if single inheritance is used All Rights Reserved. c) Triangle c) Inheriting a class which can perform and print all calculations

b) PHP a) No, only single level inheritance is used b) Multilevel inheritance b) Circle This set of Object Oriented Programming (OOPs) using C++ Multiple Choice Questions & Answers (MCQs) focuses on Multiple Inheritance. a) Before View Answer, 8. a) Higher degree

If single level inheritance is used and an abstract class is created with some undefined functions, can its derived class also skip some definitions? How to overcome diamond problem? Size of a class is _____________ d) Static or dynamic according to need If a class contains 2 nested class and is being inherited by another class, will there be any multiple inheritance? b) Derived a) Private members of base d) class student{ student(int a){} }; Take Object Oriented Programming Mock Tests - Chapterwise!

a) Anonymous class a) Change name of the class An abstract class is always a __________ class. If a class have all the abstract methods the class will be known as ___________ a) True d) Friend class cant access any data member of another class but can use its methods Which is most appropriate comment on following class definition?

If class A inherits class B and class C as class A: public class B, public class C {// class body ;}; , which class constructor will be called first? If a base class is being derived by two other classes, which inheritance will that be called? c) Friend class dont have any implementation View Answer, 5. View Answer, 7. Single level inheritance supports _____________ inheritance. a) No, because other classes must be abstract too To practice all areas of Object Oriented Programming (OOPs) using C++, here is complete set of 1000+ Multiple Choice Questions and Answers. View Answer, 4. c) Intermediate

b) After

d) Hierarchical inheritance Sanfoundry Global Education & Learning Series Object Oriented Programming (OOPs). c) Derived class should not derive from that base class b) Class definition must be ended with a colon a) C++ d) Copy b) Error : Public must come first a) True c) Super View Answer, 9. d) All can be accessed c) Templates c) At least 3 d) Private, public, or protected c) size of object is calculated using sizeof() method b) Yes, only if derived class also have nested classes This set of Object Oriented Programming (OOPs) using C++ Multiple Choice Questions & Answers (MCQs) focuses on Base Class. Which type of members cant be accessed in derived classes of a base class? b) private member c) private d) Efficient Code d) All of the mentioned d) Class is similar to union and structures c) It must have different signature in derived class b) It is child of one of the parent class Which among the following best defines the abstract methods?

View Answer, 6. d) shared In this section you can learn and practice C++ Programming Questions based on "OOPS Concepts" and improve your skills in order to face the interview, competitive examination and various entrance test (CAT, GATE, GRE, MAT, Bank Exam, Railway Exam etc.) Class is pass by _______ Select the class visibility modifiers among the following: View Answer, 12. a) The abstract functions must be only declared in derived classes b) Private scope a) Default class d) internal Which of the following functionality is facilitated by inheritance mechanism? d) All of the mentioned View Answer, 9. a) abstractmethod_name (parameter) b) protected 2011-2022 Sanfoundry. View Answer, 10. c) Those is enclosing class If base class consist of two private integers, one static integer and derived class consist of two static integers and one private integer. b) Anonymous class c) Start Class View Answer, 11. c) Kotlin

c) 3 View Answer, 9. When multiple inheritance is used, which class object should be used in order to access all the available members of parent and derived class? d) None of the mentioned a) Protected b) String class d) All of the mentioned Exception Handling & Static Class Members, Assigning Object, Passing & Returning Object, Default Arguments, Upcasting & Downcasting, here is complete set of 1000+ Multiple Choice Questions and Answers, Prev - Object Oriented Programming using C++ Questions and Answers Types of Inheritance, Next - Object Oriented Programming using C++ Questions and Answers Multilevel Inheritance, Certificate of Merit in Object Oriented Programming, Object Oriented Programming Certification Contest, Top Ranker in Object Oriented Programming, Object Oriented Programming using C++ Questions and Answers Multiple Inheritance, Object Oriented Programming using C++ Questions and Answers Inheritance, Object Oriented Programming using C++ Questions and Answers Multilevel Inheritance, Object Oriented Programming using C++ Questions and Answers Derived Class, Object Oriented Programming using C++ Questions and Answers Types of Inheritance, Object Oriented Programming using C++ Questions and Answers Hierarchical Inheritance, Object Oriented Programming using C++ Questions and Answers Base Class, Object Oriented Programming using C++ Questions and Answers Hybrid Inheritance, Object Oriented Programming using C++ Questions and Answers Upcasting, Object Oriented Programming using C++ Questions and Answers Virtual Functions, Object Oriented Programming MCQ Questions. All Rights Reserved. c) Dot operator (.)

4. Which problem arises due to multiple inheritance, if hierarchical inheritance is used previously for its base classes?

Always the base class constructors are called ___________ constructor of derived class. b) Either of those must be defined in base class c) The abstract functions must be defined in base and derived class What is the output of the following program? c) Private, protected, public a) Base b) Inheritance a) One base class derives another class b) Member functions

b) Nested class a) Class A d) Derived class should not use that function View Answer, 13. a) static b) Class B View Answer, 8. View Answer, 12. b) Declaring existing class as override d) All together In Inheritance concept, which of the following members of base class are accessible to derived class members? View Answer, 12. a) Single Which of the following concepts means determining at runtime what method to invoke? View Answer. View Answer, 14. b) Protected c) Make a class derive from it c) Class C Which of the following is not the member of class? b) Yes, only if derived class implements all the methods c) Public

View Answer, 5.

b) C++ Exception Handling & Static Class Members, Assigning Object, Passing & Returning Object, Default Arguments, Upcasting & Downcasting, here is complete set of 1000+ Multiple Choice Questions and Answers, Prev - Object Oriented Programming using C++ Questions and Answers Virtual Functions, Next - Object Oriented Programming using C++ Questions and Answers Types of Member Functions, Certificate of Merit in Object Oriented Programming, Object Oriented Programming Certification Contest, Top Ranker in Object Oriented Programming, Object Oriented Programming using C++ Questions and Answers Abstract Class, Object Oriented Programming using C++ Questions and Answers Virtual Functions, Object Oriented Programming using C++ Questions and Answers Overriding Member Functions, Object Oriented Programming using C++ Questions and Answers Derived Class, Object Oriented Programming using C++ Questions and Answers Base Class, Object Oriented Programming using C++ Questions and Answers Objects, Object Oriented Programming using C++ Questions and Answers Multilevel Inheritance, Object Oriented Programming using C++ Questions and Answers Multiple Inheritance, Object Oriented Programming using C++ Questions and Answers Public Member Functions, Object Oriented Programming using C++ Questions and Answers Hierarchical Inheritance, Object Oriented Programming MCQ Questions.