Answer Posted / priya
OBJECT:
*OBJECT IS A RUN TIME ENTITY.
*IT CAN ACCESS THE CLASS MEMBERS.
*WE CAN CREATE AN OBJECT BY THE CLASS NAME.
EXAMPLE:
class myclass
{
public:
int no;
void getdata();
void putdata();
void getdata()
{
cin>>no;
}
void putdata()
{
cout<<"NO:";
}
};
void main()
{
myclass.obj1;[-----------> object was created by the class name]
obj1.getdata();
obj1.putdata();
getch();
}
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
write a program that takes input in digits and display the result in words from 1 to 1000
Why is abstraction used?
What is encapsulation oop?
What is object in oops?
What is this pointer in oop?
Why it is called runtime polymorphism?
What is encapsulation with real life example?
Why is oop better than procedural?
Write a c++ program to display pass and fail for three student using static member function
What do you mean by abstraction?
Why is oop useful?
What is class and object with example?
What is polymorphism used for?
What is solid in oops?
What is a class in oop?