The syntax is given below shows which type of inheritance? 18. class A { ... .. ... }; class B: public A { ... .. ... }; class C: public B { ... ... ... };
1.Hierarchical inheritance
2.Hybrid inheritance
3.Multilevel inheritance
4.Multiple inheritances
Posted Date:-2022-11-30 18:18:06
What are private constructors?A private constructor is a special instance constructor. Private constructors are the constructors which can be used on the object without being explicitly defined.
1.Only (i)
2.Only (ii)
3.Both (i) and (ii) .
4.There is no concept of private cons
Posted Date:-2022-11-30 12:43:06
Which of the following statement is not true for virtual functions?
1.The virtual function must be members of some class
2.The virtual function can be a static member
3.Virtual functions are accessed by using an object pointer
4.The virtual function can be a friend of another class
Posted Date:-2022-11-30 17:56:47
A class containing one or more pure virtual functions is known as ____?
1.Abstract class
2.Static class
3.Instance class
4.None of these
Posted Date:-2022-11-30 13:07:24
Are aggregation and generalization the same thing?
1.Yes
2.No
3.Error
4.None of these
Posted Date:-2022-11-30 13:04:52
Can a destructor be virtual?
1.yes
2.No
3.Error
4.None of these
Posted Date:-2022-11-30 18:03:21
Can we create an object of abstract class type?
1.Yes
2.No
3.Error
4.None
Posted Date:-2022-11-30 16:06:41
Does an exception occur? Runtime Compile-time Select the correct option?
1.Only i
2.Only ii
3.Both i and ii
4.None of these
Posted Date:-2022-11-30 18:15:52
Early binding is also known as____?
1.Dynamic binding
2.Late binding
3.Static binding
4.Run time binding
Posted Date:-2022-11-30 16:11:57
Friend Functions cannot access the private data of other class'. Is this statement true or false?
1.True
2.False
3.Error
4.None of these
Posted Date:-2022-11-30 18:10:49
How many types of associations are there?
1.2 types
2.3 types
3.4 types
4.It does not have any type
Posted Date:-2022-11-30 13:04:03
How many types of functions are there in an object-oriented programming language?
1.4 types
2.5 types
3.2 types
4.6 types
Posted Date:-2022-11-30 18:24:04
How many types of parameter parsing does C++ support?
1.2 types
2.3 types
3.4 types
4.5 types
Posted Date:-2022-11-30 18:13:34
How many types of valid inheritance are there?
1.4 types
2.5 types
3.6 types
4.3 types
Posted Date:-2022-11-30 12:47:03
If the base class is inherited privately then the public members of the base class become protected members of the derived class and the protected members of the base class become public members of the derived class? Is this statement True or False?
1.True
2.False
3.Error
4.None of these
Posted Date:-2022-11-30 12:50:52
If the virtual function is defined in the base class, it needs not be necessarily redefined in the derived class. Is this statement true or false?
1.True
2.False
3.Error
4.None of the above
Posted Date:-2022-11-30 17:58:25
If there are different sections of an organization such as IT, computer science, Civil, Mechanical, etc. Each organization has the same attributes such as student name, roll number, year, etc. which comes under a class Student then this comes under which type of inheritance?
1.Hierarchical inheritance
2.Hybrid inheritance
3.Multilevel inheritance
4.Multiple inheritances
Posted Date:-2022-11-30 18:22:58
If two functions with the same name have different prototypes, C++ considers them as ____?
1.Friend Function
2.Overloaded function
3.Abstract function
4.Operator overloading function
Posted Date:-2022-11-30 18:00:21
In which type of inheritance does one class act as a superclass for more than one sub-class?
1.Hybrid inheritance
2.Multiple inheritances
3.Hierarchical inheritance
4.Multilevel inheritance
Posted Date:-2022-11-30 12:49:29
In which type of inheritance the child or derived class inherits the features of the superclass and simultaneously this child class acts as a superclass for another derived class?
1.Hybrid inheritance
2.Multiple inheritances
3.Hierarchical inheritance
4.Multilevel inheritance
Posted Date:-2022-11-30 12:48:35
Select the correct operator which cannot be overloaded.
1.Scope Resolution Operator (::)
2.Ternary Operator (? :)
3.Member Access or Dot Operator (.)
4.All of the above
Posted Date:-2022-11-30 18:16:33
State the correct syntax of a friend function.
1.Class ABC{ ***** Friend public: ***** Void xyz(); }
2.Class ABC{ ***** public: ***** Friend Void xyz(); }
3.Class ABC{ ***** Friend public: ***** Friend Void xyz(); }
4.Class ABC{ ***** public::friend() ***** Friend Void xyz(); }
Posted Date:-2022-11-30 18:10:06
State whether a statement is true or false? Derived classes cannot be built from abstract classes
1.True
2.False
3.Error
4.None of These
Posted Date:-2022-11-30 16:07:55
The default visibility mode in inheritance is ____?
1.Protected
2.Public
3.Private
4.None of These
Posted Date:-2022-11-30 12:50:09
The scope resolution operator is used to ____ function in the Inheritance.
1.Overload
2.Override
3.both (a) and (b)
4.None of these
Posted Date:-2022-11-30 18:21:05
The _____ constructor is invoked when an object is passed by value to a function.
1.Parameterized Constructor
2.Default Constructors
3.Copy Constructor
4.None of these
Posted Date:-2022-11-30 12:40:29
Virtual inheritance is also known as ____.
1.Clear inheritance
2.Private inheritance
3.Disinheritance
4.Multiple inheritances
Posted Date:-2022-11-30 12:53:50
What is early binding?
1.Early binding simply means that an object is bound to its function call at compile time
2.Early binding simply means that an object is bound to its function call at runtime
3.both (a) and (b)
4.None of These
Posted Date:-2022-11-30 16:10:44
When we override an inherited method in a subclass, we can _____ its access but not ____ it?
1.Increase, decrease
2.Decrease, increase
3.Error
4.None of these
Posted Date:-2022-11-30 12:51:51
Which class is mainly designed to overcome the disadvantage of multiple inheritances?
1.Virtual Base class
2.Base class
3.Abstract class
4.Partial class
Posted Date:-2022-11-30 12:54:33
Which concept of object-oriented programming language does not use base class and derived class?
1.Polymorphism
2.Over ridding
3.Abstraction
4.None of these
Posted Date:-2022-11-30 13:00:10
Which function is not a member of a class but still has access to private data of a class?
1.Friend Function
2.Pure Virtual Function
3.Static Function
4.Abstract Function
Posted Date:-2022-11-30 18:08:46
Which one of the following is not the characteristic of a constructor?
1.Constructors can be virtual
2.Constructors cannot be referred by their address
3.Constructors cannot be inherited
4.Constructors are called automatically
Posted Date:-2022-11-30 12:39:31
Which one of the following is the main benefit of single inheritance?
1.Presence of ambiguity
2.Absence of ambiguity
3.Provides modularity
4.Does not provide modularity
Posted Date:-2022-11-30 12:43:53
Which operator is used to access the static variable and static function of a class?
1.Scope Resolution Operator (::)
2.Ternary Operator (? :)
3.Member Access or Dot Operator (.)
4.All of the above
Posted Date:-2022-11-30 18:19:55
Which statement tells the correct difference between Exception and Error?
1.An exception cannot be recovered. Errors can be recovered.
2.An exception can be recovered. Errors cannot be recovered.
3.both (a) and (b)
4.None of these
Posted Date:-2022-11-30 18:14:44
__ is associated with polymorphism and inheritance.
1.Message parsing
2.Abstraction
3.Dynamic Binding
4.Encapsulation
Posted Date:-2022-11-30 13:01:28
___ Function is a function declared in a base class that has no definition relative to the base class.
1.Virtual Function
2.Pure Virtual Function
3.Friend Function
4.Static Function
Posted Date:-2022-11-30 18:01:33
___ is the relationship between a class and one or more refined versions of it.
1. Special inheritance
2.Generalization
3.Inheritance
4.None of These
Posted Date:-2022-11-30 12:58:50
___ refers to the ability to perform operations without knowing the type of object they'll be operated on.
1.Abstract base class
2.Abstract class
3.Polymorphism
4.Operator overloading
Posted Date:-2022-11-30 16:09:05
____ is a mechanism that helps us to get compile-time polymorphism. Yes No
1.Function Overloading
2.Function Overriding
3.Error
4.None of these
Posted Date:-2022-11-30 18:05:10