I am new to C (self-learning).
When I execute this for-loop function when I type 'hello' the output will be 012345. However it skips to last print function outside of the for-loop?

```
int main() {

    int c;

    for (c = 0; getchar() != EOF; ++c) {
        printf("%d\n", c);
    }

    printf("%d\n", c);

    return 0;
}

```

The output:

```
hello
0
1
2
3
4
5

```