[Solved] for loops in C with incrementing a counter and short-hand counter++ [closed]


No, this is not a correct syntax in C.

You must write it like :

for ( int i = 0; i < 5 ; i++ )
{
    printf("Value of i: %d\n", i);
}

For more information:
https://www.tutorialspoint.com/cprogramming/c_for_loop.htm

solved for loops in C with incrementing a counter and short-hand counter++ [closed]