Answer Posted / jayasrinivas.donavalli
class:class is an abstract data type in which both Member
functions and member variable are declared that means
aclass is userdefined data type in which we will be able to
declare both methods and variable.
object : Object is an Instance of the class.The class is a
valid one when object is created.
For one class we will have more number of Objects.
declaration of class in
class classname
{
public:
Member variables;
Member functions();
protected:
Member variables;
Member functions();
Private:
Member variables;
Member functions();
};
Declaration of Objects:
class classname allaisname;
here allias name is nothing but objectname.
if we want to get the data from that particular we have to
use objects.
objectname.functionname();
| Is This Answer Correct ? | 26 Yes | 4 No |
Post New Answer View All Answers
What is the difference between encapsulation and polymorphism?
Why is polymorphism used?
What is object in oops?
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
can we make game by using c
What is the types of inheritance?
What is coupling in oops?
Can destructor be overloaded?
to find out the minimum of two integer number of two different classes using friend function
What is the difference between a mixin and inheritance?
Plese get me a perfect C++ program for railway/airway reservation with all details.
What is the main feature of oop?
What is solid in oops?
what is different between oops and c++
How is polymorphism achieved?