C++ - QUESTIONS : PART 23
Classes refers to use of one or more classes within definition of another class, is called
Inheritance
Composition
Provision
None of them
SHOW ANSWER
A class that have no pure virtual member functions, are called
Polymorphic class
Concrete class
Base class
Abstract clas
SHOW ANSWER
In object oriented programming there are two distinct views, one is consumer and second is manufacturer view, that manufacturer's action are called
Functions
Operations
Methods
None of them
SHOW ANSWER
A virtual member function is a member function that can
Be overridden by a subclass
Be derived from another class
Move to any class
None of them
Be overridden by a subclass
SHOW ANSWER
Specialization and derivation is another name of
Inheritance
Composition
Provision
Containment
SHOW ANSWER
Object-oriented programming refers to use of
Derived classes
Virtual functions
PHP scripts
Both A and B
SHOW ANSWER
A pure virtual function is initialized by
0
1
2
3
SHOW ANSWER
An abstract base class is, that have
One or more pure virtual member functions
One or more child classes
One or more functions
All of them
One or more pure virtual member functions
SHOW ANSWER
A class can serve as base class for many derived classes.
True
False
SHOW ANSWER
When a class serves as base class for many derived classes, the situation is called:
polymorphism
hierarchical inheritance
hybrid inheritance
multipath inheritance
none of these
SHOW ANSWER
When two or more classes serve as base class for a derived class, the situation is known as __________.
multiple inheritance
polymorphism
encapsulation
hierarchical inheritance
none of these
SHOW ANSWER
Multiple inheritance leaves room for a derived class to have _______ members.
dynamic
private
public
ambiguous
none of these
SHOW ANSWER
What is inheritance
Inheritance allows one class to reuse the state and behavior of another class.
It deals with dangling pointers
It deals with void pointers
It is type of class declaration
Inheritance allows one class to reuse the state and behavior of another class.
SHOW ANSWER
What is abstract class
Whose objects cant be created
Whose objects can be created
Depends on class
None of above
Whose objects cant be created
SHOW ANSWER
Which allows you to create a derived class that inherits properties from more than one base class?
Multilevel inheritance
Multiple inheritance
Hybrid Inheritance
Hierarchical Inheritance
SHOW ANSWER
Which feature in OOP allows reusing code?
Polymorphism
Inheritance
Encapsulation
Data hiding
SHOW ANSWER
class derived: public base1, public base2 { } is an example of
Polymorphic inheritance
Multilevel inheritance
Hierarchical inheritance
Multiple inheritance
SHOW ANSWER
A class defined within another class is:
Nested class
Inheritance
Containership
Encapsulation
SHOW ANSWER