0
why the last output is 8 but not 1 ?
#include <stdio.h> int main() { int count = 1; while (count < 8) { printf("Count = %d\n", count); count++; } printf("%d",count); return 0; }
2 Answers
+ 3
The variable count was incremented from 1 to 8 within the while loop. The resulting value of count would be 8. Why would it be 1?
0
I think after executing the while statement again count variable