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 is object in oops?
What is difference between multiple inheritance and multilevel inheritance?
What is object-oriented programming? Webopedia definition
How Do you Code Composition and Aggregation in C++ ?
What is oops and why we use oops?
Can static class have constructor?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
How does polymorphism work?
What are the types of abstraction?
What is polymorphism in oops with example?
Why is polymorphism used?
What is polymorphism in oop example?
Can we define a class within the interface?
What is property in oops?