All mock tests are FREE till 31 December — register to save your progress
Unit 3 · Programming Languages and Computer Graphics Paper 2 CS · December 2022 (Shift 2)

Match the List-I and List-II

Figure

d.To gain access to IV. to use explicit differing instances for casting derived classes through base we have

Choose the correct answer from the options Q given below:

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. a-III, b-I, c-II, d-IV

Explanation

If classes differ only by a parameter, use templates; if actual types are known only at run time, use a class hierarchy; inline operations with templates give run-time efficiency; reaching derived-class specifics through a base needs explicit casting.

More Programming Languages and Computer Graphics questions