adspace


Difference between Structure and Class in C++?

Answer Posted / ashish raghuvanshi

Basically in C++ structure and class are same but with some
minor diffrences listed below:-
1. In classes all the members by default are private but in
structure members are public by default.
2. There is no term like constructor and destructor for
structs, but for class compiler creates default if you
don't provide.

Is This Answer Correct ?    79 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

sir please send me bpcl previous question papers

2481


draw a flowchart that accepts two numbers and checks if the first is divisible by the second.

3480