LogiQuest
Back to Constructors
8

What is the output of the following program?

var p = new Pt();
Console.WriteLine(p.X + p.Y);
class Pt
{
    public int X = 3, Y;
    public Pt() { Y = 4; }
}
Easy

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.