code
main( )
{
int i ;
for ( i = 1 ; i <= 5 ; printf ( "\n%d", i ) ) ;
i++ ;
}
output
1
infinite times.
code
main( )
{
int i ;
for ( i = 1 ; i <= 5 ; printf ( "\n%d", i ) ) ;
i++ ;
}
output
1
infinite times.
You have a trailing ;
at the end of the loop that effectively makes your code:
for ( i = 1 ; i <= 5 ; printf ( "\n%d", i ) )
{
}
i++;