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

How to declare a pointer to an array of integers?

647


What is DlgProc?

604


What are the differences between java and c++?

530


What are structures and unions?

573


Do class declarations end with a semicolon?

604






Differences between private, protected and public and give examples.

578


What is flush programming?

576


What are the stages in the development cycle?

575


What do you mean by inheritance in c++?

608


Does a derived class inherit or doesn't inherit?

620


How the keyword struct is different from the keyword class in c++?

585


What is an iterator?

690


C is to C++ as 1 is to a) What the heck b) 2 c) 10

641


Can constructor be static in c++?

643


What is the main purpose of overloading operators?

591