ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
Which of the following is correct in C++?
Correct Answer: D — Structures can have member functions
Though C does not allows member functions in structures but C++ allows structures to have member functions. Members of structures are public by default and those of classes are private by default. Classes can have protected data members.