C++ Programming - OOPS Concepts - Discussion
Discussion Forum : OOPS Concepts - General Questions (Q.No. 52)
52.
Which of the following statements is correct in C++?
Discussion:
15 comments Page 2 of 2.
Sahana said:
1 decade ago
Why structures cannot have functions as members? Isn't it that the structures can have both data members and functions as its members?
Gurubatham said:
1 decade ago
A 'structure' cannot have member function. Whereas a 'class' can have member function.
Neha said:
10 years ago
In C++, a structure can have both variables and functions as members unlike C. In C++ structure, we can also declare some of the members as 'private'.
Akshay said:
9 years ago
In C, it is not allowed to have member function but in C++, it is allowed.
Nikita said:
5 years ago
Are structure members really private? Please explain to me.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers