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 is scope in c++ with example?

618


What is the return value of the insertion operator?

597


Explain the differences between list x; & list x();.

596


Can notepad ++ run c++?

536


What are c++ manipulators?

599






Tell me what are static member functions?

600


Out of fgets() and gets() which function is safe to use and why?

714


What is c++ code?

578


How do you sort a sort function in c++ to sort in descending order?

544


What is the most useful programming language?

598


Should the this pointer can be used in the constructor?

545


What is the type of 'this' pointer? When does it get created?

539


Can you overload the operator+ for short integers?

589


Differentiate between declaration and definition.

577


Is it possible to write a c++ template to check for a function's existence?

562