FUNCTIONS, CONSTRUCTOR, DESTRUCTOR & OVERLOADING QUESTIONS IN C++. (5)

Observe the following C++ code, answer the questions (i) and (ii).
Note Assume all necessary header files are included.

class TestMeOut
{
public:
~ TestMeOut() //Function1
{
cout<<"Leaving the examination hall"<<endl;
}
TestMeOut() //Function2
{
cout<<"Appearing for examination"<<endl;
}
void MyWork() //Function3
{
cout<<"Appearing for examination"<<endl;
}
};

(i) In Object Oriented Programming, what is Function1 referred as and when does it get invoked/ called?
(ii) In Object Oriented Programming, what is Function2 referred as and when does it get invoked/ called?




No comments

Post your comments

Powered by Blogger.