Is it possible to return an object from a function? Justify your answer with an example.
Return of an Object from a Function: Yes it is possible to return an object from a function. An object can be returned to the call of its function by another object. For the justification considering the following program, //Returning of object#include<iostream.h>class myclass{ int i; public: void set_i(int n){ i=n; /*Ln 3*/ } int get_i(){ …
Is it possible to return an object from a function? Justify your answer with an example. Read More »