LogiQuest
Back to Classes and Objects
4

What is the output of the following program?

struct S { public int X; }
var a = new S { X = 1 };
var b = a;
b.X = 5;
Console.WriteLine(a.X);
Medium

Discussion (0)

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

Log in to join the discussion.