Public data members & member functions of class are accessible ONLY to member functions - C++

Q.  Public data members and member functions of the class are accessible ONLY to the member functions of that class.
- Published on 17 Jul 15

a. True
b. False

ANSWER: False
 

    Discussion

  • vijay kholiya   -Posted on 16 May 17
    we can access public data members anywhere inside the program.
  • ramesh   -Posted on 08 Oct 15
    Public data members and member functions of the class can be accessible ONLY to the member functions of that class.

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)