A

Admin • 828.03K Points
Coach

Q. What will be printed?

Code:
int x = 5;
int y = x;
y = 10;
Console.WriteLine(x);
  • (A) 5
  • (B) 10
  • (C) 0
  • (D) Compilation error

Explanation by: Admin
int is a value type, so x is not affected by changes to y.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.