What is the difference between Class and Structure?

Answer Posted / eshetu

1. IN STRUCTURE THE DATA MEMBER BY DEFAULT IS PUBLIC BUT IN
CLASS THE DATA MEMBER ARE PRIVATE.
2. THE STRUCTURE ONLY CONTAIN DATA MEMBER BUT CLASS CONTAIN
DATA MEMBER & MEMBER FUNCTION.
3.IN STRUCTURE THE STRUCTURE NAME CAN'T STAND ALONE.BUT THE
CLASS NAME CAN STAND ALONE.

Is This Answer Correct ?    10 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a dll entry point?

551


What is #include iostream?

727


Which programming language is best to learn first?

571


What is c++ w3school?

618


What is a volatile variable in c++?

548






Is java a c++?

550


Is c++ harder than java?

556


When should overload new operator on a global basis or a class basis?

602


C is to C++ as 1 is to a) What the heck b) 2 c) 10

631


Why do we use vector in c++?

590


Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

554


Is swift better than c++?

530


What is jump statement in C++?

608


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

542


Describe the role of the c++ in the tradeoff of safety vs. Usability?

699