For example
#include<stdio.h>
int main()
{
for(int i=1; i<=10; ++i)
{
printf("%d \n", i);
}
return 0;
}
Can the ++i
in the for loop updation be i++
?
For example
#include<stdio.h>
int main()
{
for(int i=1; i<=10; ++i)
{
printf("%d \n", i);
}
return 0;
}
Can the ++i
in the for loop updation be i++
?
Can the ++i in the for loop updation can be i++?
Answer is Yes
You can check the o/p in both the case. It print the same value.