What will the variable "age" be in class B?class A {int x;protected:int y;public:int age;A () { age=5; };};class B : public A {string name;public:B () { name="Bob"; };void Print() {cout << name << age;}};
A. public
B. private
C. protected
D. None of these
What will the variable "age" be in class B?class A {int x;protected:int y;public:int age;A () { age=5; };};class B : pub
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What will the variable "age" be in class B?class A {int x;protected:int y;public:int age;A () { age=5; };};class B : pub
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!