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)

If a constructor 'Date' is declared explicitly and has to be defined outside the class, which of the Q following is correct?

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

Show answer & explanation

Correct answer: A. Date::Date(int dd) {/ *... * /}

Explanation

The keyword explicit appears only on the declaration inside the class; the out-of-class definition is just Date::Date(int dd) { … }.

More Programming Languages and Computer Graphics questions