Procedures
Packages
Templates
None of given
Question No. 2
Templates automatically create
different versions of a function ,
depending on user input .
Select correct option :
True
False
Question No. 3
Derived class can inherit from public
base class as well as private and
protected base classes
True
False
Question No. 4
_____ is creating objects of one class
inside another class.
Association
Composition
Aggregation
Inheritance
Question No. 5
In ______________ destructor of sub-
object is called after destructor of
master class.
smilechat : options
Aggregation
Composition
Inheritance
Association
Question No. 6
Select correct line of code for
inheritance relationship between “ Keys ”
class and “ StandardKeys” class . “ Keys ”
is parent class while “ StandardKeys” is
child class
class StandardKeys: public Keys
class Keys: public StandardKeys
class StandardKeys:: public Keys
class Keys: : public StandardKeys
Question No. 7
In ______________ constructors of the
sub- objects are always executed
before the constructors of the master
class.
Select correct option :
Aggregation
Composition
Inheritance
Association
Question No. 8
“ Keyboard ” class is composed off
“ keys ” class. What will be the order of
execution of destructor of “ Keyboard ”
class and “ Keys” class
First Detructor:: Keys. .
Second Destructor ::Keyboard ..
First Destructor : : Keyboard ..
Second Destructor :: Keys. .
Which line will produce error. Class
phone : private Transmit , private
Receiver { } 1 . int main() 2 . { 3 . phone
obj; 4 . Tranmit * obj1 = & obj ; 5 .
Received obj2 = & obj; 6 . }
Which line will produce error . Class
phone : private Transmit , private
Receiver { } 1 . int main() 2 . { 3 . phone
obj; 4 . Tranmit * obj1 = & obj ; 5 .
Received obj2 = & obj; 6 . }
Select correct option :
3 rd line will produce error
4 th line will produce error
3 rd and 4 th line will produce error .
5 th line will produce error
What type of relationship exists
between “ Account ” class and
“ SavingAccount ” class ?
Inheritance
Composition
Aggregation
Association