The program works this way:
First, c=getchar() gets first character. Then the loop starts (checks if the char is EOF). In the loop, the char is printed and then next one is read. Then the loop ends and the expression in 'while' is calculated again. If the char is EOF, the loop ends, if it isn't - it continues (printed, then next char).
|