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

Answer the questions (i) and (ii) after going through the following class:

class mammal
{
public:
char category[20];
mammal(char xname[31]) //Funciton1
{
strcpy(category, xname);
}
mammal(mammal &t); //Funciton1
};
(i) Create an object, such that it invokes Funciton1.
(ii) Write complete definition for Funciton2.



No comments

Post your comments

Powered by Blogger.