1.

What is the output of this program?
#include 
using namespace std;
class Newclass
{
public:
int k;
Newclass *operator->()
{return this;}
};
int main()
{
Newclass object;
object->k = 15;
cout << object.k << " " << object->k;
return 0;
}

A. 15
B. 15 15
C. Compilation Error
D. Runtime Error
E. None of these
Answer» C. Compilation Error


Discussion

No Comment Found

Related MCQs