Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Programming language is C++. Read the Program in 1st and 2nd pic and answer the questions shown in 3rd and 4th pics. Answer the following
Programming language is C++. Read the Program in 1st and 2nd pic and answer the questions shown in 3rd and 4th pics.
Answer the following questions based on the implementation given below: class Mercier public: int m1 = 0; protected: int m2 = 0; private: int m3 = 0; class Parenti public: virtual void f1(const {cout 11()// This is line number 7 pp->2); // This is line number 9 pp = p: W This is line number 9 pp->10); // This is line number 10 pp->20; // This is line number 11 1 1. What constructor(s) are called in line number"1"? Answer with the class name(s) in the correct order. Use one space as the separator if multiple classes are involved. 2. What is the output of line number 4"? 3. What is the output of line number 5'? 4. What is the output of line number '17'? 5. What is the output of line number 8"? 6. What is the output of line number "10"? 7. What is the output of line number 11"? 8. "m.m2 is inaccessible in class "Child". True or False? 9. "c.m.ml" is inaccessible in function "". True or False? 10. "p2" is inaccessible in class "Member". True or False? 11. "p2" is inaccessible in class "Child". True or False? 12. "p3" is inaccessible in class "Child". True or False? 13. Changing the type "Parent" to "Child" in line number "3" causes a syntax error in function "s". True or False? 14. No constructor is called in line number "3" True or False? 15. Including the "int" attributes of the object "m", an object of the type "Child" takes 9 "int" values in memory. True or False
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started