What is the difference between Class and Structure?

Answer Posted / suresh ghosh

1.class by default used private access specifier but structure used public.
2.class is reference type but structure is value type.
3.class used stack algorithm but structure used heap algorithm.
4.structure don't used public access specifier.
5.class used inheritance but structure don't.

Is This Answer Correct ?    14 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which format specifier is used for printing a pointer value?

569


What is c++ hash?

612


What is the full form of dos?

560


Is java made in c++?

579


When we use Abstract Class and when we use Interface?where we will implement in real time?

1664






What are the differences between the function prototype and the function defi-nition?

608


What is an incomplete type in c++?

762


Why c++ does not have finally?

585


what do you mean by volatile variable?

576


What are the classes in c++?

635


How does c++ sort work?

553


Does c++ have foreach?

520


What are the uses of typedef in a program?

608


What is the use of ::(scope resolution operator)?

644


Comment on assignment operator in c++.

702