BPSC TRE – Constructors, Destructors, Inheritance & Polymorphism | Test 1

Questions 1-5 of 50

0% completed (0/50 answered)
Your score 0/50 0 answered
Correct 0 Incorrect 0 Unanswered 50 Accuracy 0%

Question 1

MCQ · Single Correct 1 mark

In C++, what type of constructor is automatically invoked when an object is initialized with another object of the exact same class type?

Answers for question 1

Question 2

MCQ · Single Correct 1 mark

What occurs when an object containing dynamically allocated heap memory relies on the compiler-generated default copy constructor without a custom copy constructor?

Answers for question 2

Question 3

MCQ · Single Correct 1 mark

In C++ constructor initialization lists, in what specific order are class data members initialized?

Answers for question 3

Question 4

MCQ · Single Correct 1 mark

Which keyword in C++ prevents single-argument constructors from being used for implicit type conversions?

Answers for question 4

Question 5

MCQ · Single Correct 1 mark

Why must the parameter of a Copy Constructor in C++ be passed by reference (const ClassName &obj) rather than by value?

Answers for question 5
Scroll to Top