I wrote this code :
#include <stdio.h>
int main() {
int c;
while ((c = getchar()) != EOF)
putchar(c);
return 0;
}
Under windows, I figured out that I have to input ctrl+z so I can stop the program, I also printed the value of EOF and it's -1. However, when I enter -1 instead of ctrl+z the program continues to execute, and I want to understand why. Thank you!