#include <stdio.h>
int main(){
int i = 0;
do {
i++;
printf("In while loop\n");
} while (i < 3);
}
output:
In while loop
In while loop
In while loop
Why the printf statement is executed three times? As soon as the loop starts the value of i becomes 1, so the loop should run 2 times only but it is running 3 times, how?