Question:Consider two classes A and B:
class A
{

private:

    int x;
    float y;

public:

friend class B;
};

class B
{
};
Which of the following is true? 

A A can access all private data members of B 

B B can access all private data members of A 

C A cannot access the private members of B 

D B cannot access the private members of A 

E Both A and B can access each other's private data members 

+ Answer
+ Report
Total Preview: 15331

Copyright © 2024. Powered by Intellect Software Ltd