I have a question. I am studying for an exam and am not clear on something. I have the following class definition.

class A
{
private:
int x;
protected:
int y;
public:
int z;
void f(int k);
};
class Bublic A
{
private:
int w;
int f();
};
class Crivate A
{
public:
int w;
void f(int K);
};
clas Dublic B
{
public:
void f();
};

//These definitions are in the main()

A a;

B b;

C c;

//Which of the following are illegal?

cout<<b.f()<<"/n";

c.f(3);

b.z=5;

c.z=7;

I looked at all the statements and find that they are all legal?
Am I right?