OOPS
August 29, 2024OOPS
August 29, 2024OOPS
Question 19 |
What is the output of the following program:
#include
class sample
{
private int a,b’
public: void test ( )
{
a = 100;
b = 200;
}
friend int compute (sample e1);
};
int compute (sample e1)
{
return int (e1.a + e1.b) – 5;
}
Main ( )
{
Sample e;
e.test( );
Cout < < compute(e);
}
205 | |
300 | |
295 | |
error |
Correct Answer: C
Subscribe
Login
0 Comments