1. Home
  2. CPET
  3. Computer Science

Filters

Found 1 Question

Set Default
Exams
Years
Subjects
Topics

List of top Computer Science Questions on C++ Constructors and Inheritance Order asked in CPET

Given the following C++ code, what will be the order of constructor execution?

class A { public: A() { std::cout << "A" ; } };
class B : public A { public: B() { std::cout << "B" ; } };
class C : public B { public: C() { std::cout << "C" ; } };
int main() { C obj; return 0; }
  • CPET - 2025
  • CPET
  • Computer Science
  • C++ Constructors and Inheritance Order
contact us
terms & conditions
Privacy & Policy
© 2026 Patronum Web Private Limited