What is the difference between Class and Structure?
Answer Posted / vandana mishra
Class is much broader,real world applicable 1-1-1: concept whereas structure is a primitive concept with poor internal organisation.
2: structure contains only data while class bind both data & member functions.
3: class provide data hiding,inheritance etc but structure didn't.
4: if we not define constructor in class there constructor automaticly invoke but in structure it does not happen automaticly.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the isa and hasa class relationships.
Define pure virtual function?
What operators can you overload in c++?
What is public, protected, private in c++?
What will the line of code below print out and why?
Give an example of run-time polymorphism/virtual functions.
What is size_type?
Why is c++ a mid-level programming language?
How do you import payscale data from non SAP to SAP?is it through LSMW or any other way is there?
What is the difference between passing by reference and passing a reference?
Define token in c++.
How does atoi function work?
What is java and c++?
Which programming language is best?
How can an improvement in the quality of software be done by try/catch/throw?