C++ Programming - Objects and Classes - Discussion

Discussion Forum : Objects and Classes - General Questions (Q.No. 23)
23.
Which of the following is the only technical difference between structures and classes in C++?
Member function and data are by default protected in structures but private in classes.
Member function and data are by default private in structures but public in classes.
Member function and data are by default public in structures but private in classes.
Member function and data are by default public in structures but protected in classes.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
2 comments Page 1 of 1.

Rashmi said:   9 years ago
But there is no member function concept in structure.

Daniel Sandor said:   10 years ago
This is not the only difference. Parents of classes are by default private parents. Parents of structures are by default public parents.

Post your comments here:

Your comments will be displayed after verification.