class Base
{
public: int a;
protected: int b;
private: int c;
};
class Derived : Base
{
int d;
friend Friend;
};
class Friend
{
Derived derived;
};</blockquote>
In the following code, which of the following variables can be accessed in “Friend”?
A. only a and b
B. a,b and c
C. only a
D. error
{
public: int a;
protected: int b;
private: int c;
};
class Derived : Base
{
int d;
friend Friend;
};
class Friend
{
Derived derived;
};</blockquote>
In the following code, which of the following variables can be accessed in “Friend”?
A. only a and b
B. a,b and c
C. only a
D. error