C++ Institute CPA - C++ Certified Associate Programmer CPA-21-02 Question # 20 Topic 3 Discussion

C++ Institute CPA - C++ Certified Associate Programmer CPA-21-02 Question # 20 Topic 3 Discussion

CPA-21-02 Exam Topic 3 Question 20 Discussion:
Question #: 20
Topic #: 3

What will variable "y" be in class B?

class A {

int x;

protected:

int y;

public:

int age;

};

class B : public A {

string name;

public:

void Print() {

cout << name << age;

}

};


A.

public


B.

private


C.

protected


D.

None of these


Get Premium CPA-21-02 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.