If A is a superclass, B is a subclass of A, and C is a subclass of B, in what…

PYQ RPSC Programmer 2024Modified — slightly modified from the official paper; see the solution

If A is a superclass, B is a subclass of A, and C is a subclass of B, in what order are the constructors of these classes called? (Assume the standard automatic superclass-constructor invocation used in mainstream OOP languages such as C++, Java, and C#.)

  1. A.

    A, C, B

  2. B.

    A, B, C

  3. C.

    C, A, B

  4. D.

    C, B, A

  5. E.

    Question not attempted

Attempted by 592 students.

Sign up free to check your answer

Sign up free

Explore the full course: Rpsc Programmer

Loading lesson…