CS304 Object Oriented Programming Quiz No 2 Spring 2013

Question No.1
Sender of the message does not need to know the exact class of receiver in______.
Please chose one
1) Abstraction
2) Polymorphism
3) Inheritance
4) none of the given
Answer: 2
Question No.2
Target of a _____ function call is determined at run time.
Please chose one
1) instance
2) virtual
3) operator
4) none of given
Answer: 2
Question No.3
A function call is resolved at run-time in_________ .
Please chose one
non-virtual member function
virtual member function
Both non-virtual member and virtual member function.
None of given
Answer: 3
Question No.4
Consider the code below, class class1{ public: void func1(); }; class class2 : protected class1 { }; Function func1 of class1 is ____ in class2,
Please chose one
public
protected
private
none of the given options
Answer: 2
Question No.5
Consider the code below, class c1{ }; class c2 : public c1 { }; class c3 : public c2 { }; Then c2 is,
Please chose one
Direct base class of c3
Direct child class of c3
Direct base class of c1
None of these
Answer: 1
Question No.6
A template provides a convenient way to make a family of.
Please chose one
1) variables and data members
2) functions and classes
3) classes and exceptions
4) programs and algorithms
Answer: 2
Question No.7
Consider the code below, class c1{ }; class c2 : public c1 { }; class c3 : public c2 { }; Then c1 is,
Please chose one
Direct base class of c3
Direct child class of c3
Direct base class of c2
Direct child class of c2
Answer: 2
Question No.8
User can make virtual table explicitly.
Please chose one
True
False
Answer: 1
Question No.9
In type in depended function template should be use wherecode and behavior must be identical.
Please chose one
True
False
Answer: 1

Question No.10
Consider the code below, class class1{ protected: int i; }; class class2 : private class1 { }; Then int member i of class1 is ____ in class2,
Please chose one
public
protected
private
none of the given options

 

DOWNLOAD SOLUTION HERE
loading...