What is the difference between class and structure?
Answer Posted / arvind
The main difference is
Structure ... Class
struct . Class
{ . {
data members ... data members
} ... +
... Member functions
... }
We can't define Functions inside structure where as in class we can define inside
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Why multiple inheritance is not allowed?
Prepare me a program for the animation of train
Why is polymorphism needed?
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout< What do you mean by variable? #include What does enum stand for? What is the real time example of inheritance? What is the difference between abstraction and polymorphism? Whats is abstraction in oops? What is object in oop? What is Difference Between Inheritance and creating object
and getting data? means
Class A extends B{
B.getMethod();}
(OR)
Class A{
b obj=new B();
obj.getMethod();
} What language is oop? Explain the concepts involved in Object Oriented programming. Can we have inheritance without polymorphism?