CJCoding With Joseph
← Back to Question List
C# Code Walkthrough #33

Block Scope

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