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
Which coding certification is best?
Write a Program to find the largest of 4 no using macros.
What are all predefined data types in c++?
How can you create a virtual copy constructor?
What are smart pointers?
How the virtual functions maintain the call up?
How is objective c different from c++?
What is iostream in c++ used for?
How one would use switch in a program?
What are different types of loops in c++?
What is a list c++?
What problems might the following macro bring to the application?
Which function cannot be overloaded c++?
What does extern mean in a function declaration in c++?
On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?