explain defference between structure and class with example
Answers were Sorted based on User's Feedback
Answer / maheshkumar eaga
In structure By default data members are public
In class By default data members are private
| Is This Answer Correct ? | 3 Yes | 0 No |
The structure, data type available in C is defined as Class in C plus plus. Where the data member variables in structure are accessible by all functions, methods. In Class the data variables and methods are encapsulated in one class with explicit accessible feature as public or private to protect the data. the data can also be protected with protect feature which is not available in structure data type. the only difference is data protection.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the access specifiers avaible in c++?
Whats is abstraction in oops?
What is overloading in oops?
why function overloading is not called as pure polymorphism?
should we use linear search or binary search if elements are placed in random order or mixed?in both cases? i need a little bit detail ans?thnks
Difference between realloc() and free?
what is single inheritance?
what is virtual function?
what is the advantage in software? what is the difference between the software developer and Engineer
How many human genes are polymorphic?
How can you overcome the diamond problem in inheritance?
What is the full form of oops?