1.

Predict the output of following C++ program#include<iostream>using namespace std;class Test{private:int x;int y;public:Test(int x = 0, int y = 0) { this->x = x; this->y = y; }static void fun1() { cout << "Inside fun1()"; }static void fun2() { cout << "Inside fun2()"; this->fun1(); }};int main(){Test obj;obj.fun2();return 0;}(A) Inside fun2() Inside fun1()(B) Inside fun2()(C) Inside fun1() Inside fun2()(D) Compiler Error

Answer»


Discussion

No Comment Found

Related InterviewSolutions