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
What does enum stand for?
What is oops?what is its use in software engineering?
What is the renewal class?
Why is abstraction needed?
How does polymorphism work?
What is the example of polymorphism?
What is this pointer in oop?
What is and I oop mean?
can we make game by using c
Can static class have constructor?
How is class defined?
Advantage and disadvantage of routing in telecom sector
Prepare me a program for the animation of train
Why is polymorphism important in oop?
What is overloading and its types?