I\'m currently trying to learn some C in my spare time. I have some experience in Java, and I\'m therefore used to limit scoping of i.e. variables with curly braces. But I\'
You may just treat if/else if/else
instructions as one block - they can't really be divided, else
cannot exist on it's own.
On the side note, it's sometimes confusing when you have a situation like
if(something)
if (somethingOther)
....
else
.....
If your code is long enough, you might get confused where to attach this else
, so it's good to always use braces. As stated in comment, else
always attaches to the "nearest" if
.