| 1 | #include <stdio.h> |
| 2 | |
| 3 | int main(int argc, char const *argv[]) { |
| 4 | printf(format: "Hello world.\n" ); // Set breakpoint here |
| 5 | char line[100]; |
| 6 | if (fgets(s: line, n: sizeof(line), stdin)) { |
| 7 | fprintf(stdout, format: "input line to stdout: %s" , line); |
| 8 | fprintf(stderr, format: "input line to stderr: %s" , line); |
| 9 | } |
| 10 | if (fgets(s: line, n: sizeof(line), stdin)) { |
| 11 | fprintf(stdout, format: "input line to stdout: %s" , line); |
| 12 | fprintf(stderr, format: "input line to stderr: %s" , line); |
| 13 | } |
| 14 | if (fgets(s: line, n: sizeof(line), stdin)) { |
| 15 | fprintf(stdout, format: "input line to stdout: %s" , line); |
| 16 | fprintf(stderr, format: "input line to stderr: %s" , line); |
| 17 | } |
| 18 | printf(format: "Exiting now\n" ); |
| 19 | } |
| 20 | |