Computer Science, asked by mayank21511, 9 months ago

পাৰি বৰ্ণনা কৰা।
Describe the mechanism of accessing data members and member
functions in the following cases :
در
(1) Inside the main program
(ii)
Inside a member function of the same class
(iii) Inside a member function of another class.​

Answers

Answered by Anonymous
48

Explanation:

Accessing Data Members of Class in C++

If its public, then the data member can be easily accessed using the direct member access (.) operator with the object of that class. If, the data member is defined as private or protected, then we cannot access the data variables directly.

Answered by Anonymous
0

Answer:

Accessing data members of class in C ++

If it is public then the data member can be easily accessed using the direct member Access . operator with the object of the class . If the data member is defined as private or protected then we can't Access the data variable directly ..

Hope it helps you if so ,

please mark as brainliest ...

Similar questions