C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 52)
52.
Which of the following statements is correct in C++?
Classes cannot have data as protected members.
Structures can have functions as members.
Class members are public by default.
Structure members are private by default.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
15 comments Page 2 of 2.

Shubham Barnwal said:   1 decade ago
B is incorrect answer.

Structure can't have function as a member.
(1)

Nikita said:   5 years ago
Are structure members really private? Please explain to me.

Gopal said:   1 decade ago
How can structures have functions as members?

Sandesh said:   1 decade ago
Class members are private by default in c++.

Akash said:   1 decade ago
Can some one give me example of such struct?


Post your comments here:

Your comments will be displayed after verification.