What is the difference between Class and Structure?

Answer Posted / swetcha

The difference between a class and a structure is that, by
default, all of the members of a class are private and, by
default, all of the members of a structure are public.

Is This Answer Correct ?    797 Yes 102 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to implement is-a and has-a class relationships?

578


What is setbase c++?

619


How compile and run c++ program in turbo c++?

620


Is swift better than c++?

532


What is a c++ map?

656






Is C++ case sensitive a) False b) Depends on implementation c) True

610


What happens when the extern "c" char func (char*,waste) executes?

630


What do you mean by early binding?

596


What is the identity function in c++? How is it useful?

544


How many types of classes are there in c++?

589


Explain the operation of overloading of an assignment operator.

686


What is the use of setfill in c++?

577


Which should be more useful: the protected and public virtuals?

594


Can we use this pointer in a class specific, operator-overloading function for new operator?

607


How many keywords are used in c++?

550