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

What is fflush c++?

580


How do you remove an element from a set in c++?

584


What is the difference between public and private data members?

666


Explain operator overloading.

606


What is exception handling? Does c++ support exception handling?

591






What are the advantage of using register variables?

643


What's the order in which the local objects are destructed?

842


How would you find out if a linked-list is a cycle or not?

555


what is data encapsulation in C++?

607


What is polymorphism and its type in c++?

594


What it is and how it might be called (2 methods).

660


Differentiate between declaration and definition.

589


We use library functions in the program, in what form they are provided to the program?

602


What is the difference between reference and pointer?

614


What is the object serialization?

629