I have this code,
When i press ENTER key on both input prompt,Code:#include <stdio.h>
#include <conio.h>
int main(void)
{
char test;
test = getch();
printf("CHAR: %d\n", test);
test = fgetc(stdin);
printf("CHAR: %d", test);
return 0;
}
getch() returns 13, while fgetc() returns 10,
can anyone tell me why?
Aren't they supposed to do the same thing (get one character from user) ?
Thanks
