What is an object?

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


Please Help Members By Posting Answers For Below Questions

What are functions in oop?

586


What is overloading in oops?

598


Whats oop mean?

601


Plese get me a perfect C++ program for railway/airway reservation with all details.

3431


What is the difference between a mixin and inheritance?

524






What does it mean when someone says I oop?

587


Get me an image implementation program.

1561


How do you achieve polymorphism?

618


What is abstraction in oops with example?

778


What do you mean by abstraction?

619


What is debug class?what is trace class? What differences are between them? With examples.

1612


Which language is not a true object oriented programming language?

646


What are constructors in oop?

598


What are different oops concepts?

578


Prepare me a program for the animation of train

2005