Files
RedBear-OS/tests/stdio/getc_unget.c
T
2019-02-20 19:27:18 +01:00

13 lines
179 B
C

#include <stdio.h>
int main(void) {
ungetc('h', stdin);
char c;
if ((c = getchar()) == 'h') {
printf("Worked!\n");
return 0;
}
printf("failed :( %c\n", c);
return 0;
}