What is the difference between class and structure?
Answer Posted / mohan
By default the members of struct are public.
By default the members of class are priavte.
When an object is created to a class, constructor will be
called automatically.
But not in struct (if structure having member function with
structure name)
| Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
Why is polymorphism used?
What is polymorphism give a real life example?
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.
#include
What is inheritance in oop?
What are the two different types of polymorphism?
Plese get me a perfect C++ program for railway/airway reservation with all details.
What is the difference between a constructor and a destructor?
Why is encapsulation used?
Which is not an object oriented programming language?
What is the use of oops?
How do you use inheritance in unity?
What is object in oop?
What is the importance of oop?
Who invented oop?