1.

What is the output of this program?
#include 
using namespace std;
class num
{
int N;
public:
int getN();
void putN(int M);
};
int num::getN()
{
return N;
}
void num::putN(int M)
{
N = M;
}
int main()
{
num obj;
obj.putN(15);
cout << obj.getN( );
return 0;
}

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


Discussion

No Comment Found

Related MCQs