What is the difference between Class and Structure?

Answer Posted / ravi kumar jain

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.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 ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What information can an exception contain?

671


Is nan a c++?

617


What is flush programming?

578


Explain how the virtual base class is different from the conventional base classes of the opps.

695


What kind of problems can be solved by a namespace?

595






Is there finally in c++?

629


Why c++ is better than c language?

568


Write a c program for binary addition of two 8 bit numbers.

3670


What are the advantages of using typedef in a program?

646


what are the iterator and generic algorithms.

1487


Define basic type of variable used for a different condition in C++?

671


Is it possible to provide default values while overloading a binary operator?

773


Explain the virtual inheritance in c++.

603


Give 10 points of differences between C & C++.

632


Should I learn c or c++ first?

572