Font size:
Print
Question:

What is the output of this program?

class sample

{

private;

int var;

public;

void input()

{

cout<<var;

}

void output()

{

cout<<"Variable entered is";

cout<<var<<"\n"

}

}

void main()

{

sample object;

object.input();

object.output();

object.var();

}


1. Runtime error
2. Varible entered is 5
3. Error
4. None of the mentioned
Prev Question In ASP.NET the sessions can be dumped by using
Next Question When base class is derived in protected mode, t...