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
Why multiple inheritance is not possible?
Is oop better than procedural?
write string class as your own class in java without using any built-in function
What is oops concept with example?
when to use 'mutable' keyword and when to use 'const cast' in c++
State what is encapsulation and friend function?
i got a backdoor offer in process global,Bangalore..Can i work with it?
What type of loop is a for loop?
What are main features of oop?
What is byval and byref? What are differences between them?
What is class in oop with example?
class type to basic type conversion
What is abstraction in oop?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
How to hide the base class functionality in Inheritance?