Default members of the class are private in nature - C++ basic concepts

Q.  By default, members of the class are ____________ in nature.
- Published on 17 Jul 15

a. protected
b. private
c. public
d. static

ANSWER: private
 

    Discussion

  • Raj   -Posted on 13 Oct 15
    By default, members of the class are private in nature. There are three access modifiers in CPP. Public, protected and private. If you have not provided any access modifier then by default it is consider as private.

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.)