Hi all!
I'm a beginner in C programming.
I have a problem with compiler or maybe it's incorrect work of function putchar().
So, I run the programm like this
#include <stdio.h>
int main(void)
{
for (;;)
{
printf("%d\n", getchar()!=EOF);
}
}
and after I put ^Z my programm prints 0 as a loop without break, but the exact same code compiled with other compilers like MSVC and MinGW works different. Programm just prints 0 once. Where could my mistake be?