What is the difference between Class and Structure?

Answer Posted / rakesh kumar

structure can not be declare privately but class can be
declared public as well as private.In structure data member
and member function are public by default and in class
these are private by default

Is This Answer Correct ?    59 Yes 39 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are friend functions in C++?

624


How do you print a string on the printer?

582


What do you mean by stack unwinding in c++?

732


What do manipulators do?

572


Which operator cannot be overloaded c++?

593






What is the difference between strcpy() and strncpy()?

612


What is a local reference?

675


Which operator cannot overload?

543


Define what is constructor?

588


Explain class invariant.

588


What is a hash function c++?

554


What is the difference between ++ count and count ++?

585


What is the protected keyword used for?

618


What are vtable and vptr?

625


What can I use instead of namespace std?

645