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

which feature are not hold visual basic of oop?

1717


Explain the advantages of inheritance.

666


If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?

936


How to improve object oriented design skills?

565


What is the difference between abstraction and polymorphism?

606






What is inheritance write a program to show use of inheritance?

607


assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

1662


Explain virtual inheritance?

680


What is polymorphism programming?

593


Write a program to sort the number with different sorts in one program ??

1910


Why do we use encapsulation in oops?

512


what is graphics

2003


What is an interface in oop?

589


Why do we need polymorphism in c#?

677


Can we create object of abstract class?

571