Match the List-I and List-II
| List-I | List-II |
| a. If the implementation of generated or derived classes differs only through a parameter we have | I. to use class hierarchy |
| b. If the actual types of objects used cannot be known at compile time, then we have | II. improved run-time efficiency |
| c. If inline operations are essential and templates are used then we have | III. to use templates |
| d. To gain access to differing instances for derived classes through base we have | IV. to use explicit casting |
Choose the correct answer from the options given below:
For a:
If implementation differs only through a parameter, templates are useful.
So,
a → III
For b:
If actual object types are not known at compile time, class hierarchy and runtime polymorphism are used.
So,
b → I
For c:
Templates allow inline operations and can improve run-time efficiency.
So,
c → II
For d:
To access derived class instances through base class reference or pointer, explicit casting may be used.
So,
d → IV
Correct matching:
a-III, b-I, c-II, d-IV
Online Test Series, Information About Examination,
Syllabus, Notification
and More.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.