CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Block Scope

C# code walkthrough · Question 33
mediumScope

Code

Read carefully. What does this print?
1int x = 5;
2{
3 int y = x * 2;
4 Console.WriteLine(y);
5}
6Console.WriteLine(x);

Your answer