What does this print Walk me through it please step by step
What does this print? Walk me through it please step by step.
For (i = 5; i lessthan 10; i + = i%2){printf(\"%d\", i++);}Solution
#include <stdio.h>
int main(void)
{
int i;
for(i=5;i<10;i+=1%2)
{
printf(\"\ %d\",i++);
}
return 0;
}
Output
i=9+9%2 = 9+1 =10 =10 so condition i<10 is not met , it will not be printed.
