explain defference between structure and class with example
Answer Posted / padmas
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 |
Post New Answer View All Answers
What do you mean by variable?
What is overriding vs overloading?
What is the highest level of cohesion?
Why is encapsulation used?
what type of questions
What is class and object in oops?
what are the ways in which a constructors can be called?
What are benefits of oop?
What are the benefits of interface?
What is the example of polymorphism?
what is the drawback of classical methods in oops?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What is the difference between static polymorphism and dynamic polymorphism?
How do you define social class?
What is the types of inheritance?