You are not logged in.

#1 2015-05-26 06:22:59

hasnain
Administrator
From: Chichawatni
Registered: 2014-10-13
Posts: 8,355
Website

Return Value:

Question:
The return value of the following code is:

Class1& test(Class1 obj)
{
Class1 *ptr = new Class1();
.........
return ptr;
}

Option A):
object of Class1
Option B):
reference to ptr
Option C):
reference of Class1
Option D):
object pointed by ptr

Correct Answer is Option B):
reference to ptr


Failure is the first step towards seccess.

2015-05-26 06:22:59

Advertisement
Ads By Google

Re: Return Value:



Board footer