Sorry, I have not verify this when I paste my answer.
The correct is: When you type enter(0d0a)
only "0a" was put to the input buff, please try the following code, when you look back again:
#include <stdio.h>
int main()
{
char c;
for(;;)
{
c = getchar();
printf("%d\n",c);
}
return 0;
}