The members of a struct are _______ by default. 

  • private 
  • public 
  • protected 
  • static
In C++, the members of a structure (struct) are public by default. This means they can be accessed from functions outside the structure. This is in contrast to the members of a class, which are private by default and cannot be accessed or viewed outside of the class.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *