Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Programming C++ questions True and False Questions!!! 1) A regular virtual funct

ID: 3840623 • Letter: P

Question

Programming C++ questions

True and False Questions!!!

1)

A regular virtual function declared in a base class must be implemented in the same base class

2)

In a base class, pure virtual functions may be implemented in that class

3)

A destructor function of a base class can be declared virtual

4)

A pure virtual function declared in the base class must be implemented in every class derived from the base one

5)

A derived class always call the constructor of its class before executing the body of its own constructor

6)

A constructor function of a base class can be declared virtual

7)

A class that has a pure virtual member function is called a concrete base class

Explanation / Answer

1) False, a regular virtual function declared in base class will be implemented in derived class.

2) False, a pure virtual function cannot be implemented in that class.

3) True , a destructor function of base class can be declared virtual

4) True, A pure virtual function declared in the base class must be implemented in every class derived from the base one.

5) True, by default there is super() provided in constructor of derived class which calls constructor of base class first and then control comes back to derived class.

7) False, a class having pure virtual member function is not concrete class.