in Programming in C
175 views
0 votes
0 votes
int a=10

if(i++<10),if(++i<10).,while(i++<10) what is logic behind
in Programming in C
by
175 views

1 Answer

1 vote
1 vote
For i++, It will check if 10 is less than 10 and then increment the value to 11.

for ++i It will check if 11 is less than 10 (preincrement)

Similarly, for while(i++ < 10) It will check if 10 is less than 10 and then increment value to 11.
by