From 5018e06c580dd21c958ec1672c26a3448faf0c55 Mon Sep 17 00:00:00 2001 From: zlg Date: Wed, 13 Feb 2013 20:48:44 -0600 Subject: Add license file, reorganize project --- 1-10_literal-escapes.c | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 1-10_literal-escapes.c (limited to '1-10_literal-escapes.c') diff --git a/1-10_literal-escapes.c b/1-10_literal-escapes.c deleted file mode 100644 index 903fff4..0000000 --- a/1-10_literal-escapes.c +++ /dev/null @@ -1,33 +0,0 @@ -#include - -/* The C Programming Language, 2nd Edition - * - * Exercise 1-10: Write a program to copy its input to its output, replacing - * each tab by '\t', each backspace by '\b', and each backslash by '\\'. This - * makes tabs and backspaces visible in an unambiguous way. - * - * Answer: Run a loop with getchar() and check its value. When you run into a - * tab, backspace, or backslash, just output the two characters and move on. - */ - -int main(void) { - char c; - - while ((c = getchar()) != EOF) { - if (c == '\t') { - printf("\\t"); - continue; - } - if (c == '\b') { - printf("\\b"); - continue; - } - if (c == '\\') { - printf("\\\\"); - continue; - } - putchar(c); - } - - return 0; -} -- cgit v1.2.3-70-g09d2 fslogtreecommitdiff
href='/knr/commit/ch2/2-01_limits.c?id=831e4405d64b571f885e92b62b976ad2ced16b2e&follow=1'>Solve Exercise 2-01: Variable limits
AgeCommit message (Expand)AuthorFilesLines
zlg2-0/+143
2013-02-13Add license file, reorganize projectzlg26-0/+15
2013-02-13Fix 1-09's solutionzlg1-2/+4
2013-02-08Fix Exercise 1-12's solutionzlg1-2/+4
2013-02-07Solve Exercises 1-1 to 1-12zlg12-0/+307
2013-02-06Fix style issue and correct 1-24zlg1-4/+4
2013-02-06Solve Exercise 1-24: C syntax checkerzlg1-110/+122