18. A base class may have at most ________ child class derived from it. Select o
ID: 3680094 • Letter: 1
Question
18.
A base class may have at most ________ child class derived from it.
Select one:
a. 1
b. 2
c. 12
d. any number
19
If the following function is in a base class, which of the following are polymorphic declarations of the same function in the derived class?
virtual void print( ostream& out);
Select one:
a. virtual void print ( ostream& out);
b. void print( ostream& out);
c. void print();
d. virtual void print();
e. virtual void print ( ostream& out); and void print( ostream& out);
f. virtual void print ( ostream& out); and virtual void print();
20.
The assignment operator is inherited from the base class.
Select one:
True
False
21.
Which of the following should be virtual if a base class uses dynamic memory allocation?
Select one:
a. the constructor
b. the copy constructor
c. the print function
d. the destructor
22.
The base class has everything that is in the derived class and more.
Select one:
True
False
23.
All member functions in a base class should be listed as virtual functions.
Select one:
True
False
24.
If the member variables in the base class are listed as protected, then who can access or modify those variables?
Select one:
a. friends of the base class
b. friends of the derived class
c. members of the base class
d. members of the derived class
e. friends of the base class and friends of the derived class
f. members of the base class and members of the derived class
g. All of these
25.
An object of a derived class can be stored in a base class variable.
Select one:
True
False
Explanation / Answer
18 - D
19 - E
20 - False
21 - D
22 - False
23 - False
24 - g
25 - True
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.