They are not the same. In one, the for loop is:
Code:
for(i=0;i<5;i++)
{
...
  continue; // clearly you don't understand what this statement does
...
}
and in the other it is:
Code:
for(i=0;i<5;)
{
...
  continue; // clearly you don't understand what this statement does
...
i+=1;
}
Go and RTFM on "continue" and you will see why the programs behave differently.