1.

What is the output of this program?
#include 
using namespace std;
class DummyClass
{
public:
int IsItMe (DummyClass& parameter);
};
int DummyClass::IsItMe (DummyClass& parameter)
{
if (&parameter == this)
return true;
else
return false;
}
int main ()
{
DummyClass p;
DummyClass *q = &p;
if (q->IsItMe(p))
{
cout << "Program executed...";
}
else
{
cout< }
return 0;
}

A. Program not execute...
B. Program executed...
C. Compilation Error
D. Runtime Error
E. Garbage Value
Answer» C. Compilation Error


Discussion

No Comment Found

Related MCQs