C | Variable Declaration and Scope | Question 5
var = 10;
(B) Compiler Error
(C) Garbage Value
Explanation: x is not accessible.
The curly brackets define a block of scope. Anything declared between curly brackets goes out of scope after the closing bracket.
Quiz of this Question