Hi guys, Im just wondering about the following code:
when I run it, it produce an infinite loop, can anyone tell me the reasons,why does it produces infinite loop??Code:# include <stdio.h> # include <math.h> int main(void) { int i = 0; while (i < 10) { i++; if (i = 5) printf("i = %d\n",i); } return 0; }
thanks