From e23f06729ed1fe6693c3411f8df3ba7eeadf3ed3 Mon Sep 17 00:00:00 2001 From: Felipe Boeira Date: Thu, 21 Jan 2021 22:47:02 +0100 Subject: Update lab1test2.c to print keys read from console --- src/examples/lab1test2.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/examples/lab1test2.c') diff --git a/src/examples/lab1test2.c b/src/examples/lab1test2.c index 4438025..e86e3b6 100644 --- a/src/examples/lab1test2.c +++ b/src/examples/lab1test2.c @@ -191,6 +191,7 @@ int main(void) printf("Type 10 characters: "); bytes_read = read(STDIN_FILENO, sbuf, READ_CONSOLE_COUNT); printf("\n"); + printf("You have typed: ‰s\n", sbuf); if (bytes_read != READ_CONSOLE_COUNT) { ERROR("Failed to read %d characters from console, read %d.\n", READ_CONSOLE_COUNT, bytes_read); -- cgit v1.2.1