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 |
Child cObj = new Parent() Wahts the output ?
What is encapsulation process?
Whatis the difference between oop and object based language
what is the difference between class and object?
What is the difference between pass by reference and pass by value?
What is polymorphism explain its types?
What are the advantages of polymorphism?
WHAT IS ABSTRUCT DATA TYPE ? PLEASE EXPLAIN IT.
write a program in c++ to overload the function add (s1,s2) where s1 and s2 are integers and floating point values.
what is the technical or oop name of object?
what is namespace? what are the uses of namespace?
What is difference between function overloading and overriding?