SyntaxFix
Write A Post
Hire A Developer
Questions
{ } -->
{ }
defines scope, so if(a==1) { int b = 10; } says, you are defining int b, for {}- this scope. For
if(a==1) { int b = 10; }
if(a==1) int b =10;
there is no scope. And you will not be able to use b anywhere.
b