Input buffer flush
问题 Consider the code below: #include<stdio.h> int main(){ char c; while( ( c=getchar() ) != EOF ) printf("%c\n",c); return 0; } I gave the input as: hi^Z The output was: h i (an arrow pointing towards left) [Sorry, I couldn't find character for the above arrow. ] Can someone please explain the output ? Since ^Z is part of the character string and there are characters to flush, I think ^Z shouldn't have been passed and thus the output should be, h i (new line ) P.S - I am on windows and ^Z thus