adspace


Difference between Structure and Class in C++?

Answer Posted / madhusudhan

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.

3. Sizeof empty structure is 0 Bytes wer as Sizeof empty
class is 1 Byte

Is This Answer Correct ?    24 Yes 20 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

3480


sir please send me bpcl previous question papers

2481