LogiQuest
Back to Structures and Enumerations
6

What is the output of the following program?

var p = new Point(2, 3);
var q = p;
q.X = 10;
Console.WriteLine(p.X);
struct Point
{
    public int X, Y;
    public Point(int x, int y) { X = x; Y = y; }
}
Easy

Discussion (0)

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

Log in to join the discussion.