Initially variable i is only declared. So, it will contain some garbage value.
NOTE: If int variable is declared only (not initialized), it will contain some garbage value.
After that, let’s come to for loop :
1. The portion 1 of the for loop (which is generally called as initialization part), will update the value of i and
set it to 1.
2. Then, portion 2 of the for loop (which is generally called as condition checking) will again update
the value of i to -1.
3. Now, it will go inside for loop (which is generally called a content of for loop), where it will find
if condition. As the value of i = -1 < 5. So, it will come out of for loop.
NOTE : As curly braces are missing in the for loop syntax, then the statement which is immediately
following the for loop, will be treated as the content of for loop.
Then it prints the value of i, which will print -1.
Output : -1