diff --git a/KNR C/ex1_10.c b/KNR C/ex1_10.c index 18d39d9..941bfc4 100644 --- a/KNR C/ex1_10.c +++ b/KNR C/ex1_10.c @@ -1,13 +1,13 @@ #include int main(){ -int a = 0; +int a = 0; /*Initializing a as zero; this doesn't matter because getchar is called at the top of the loop */ while (a != EOF){ a = getchar(); - if (a == '\b' || a == '\t' || a == '\\'){ + if (a == '\b' || a == '\t' || a == '\\'){ /*Test whether the currently selected character is a tab, backspace, or backslash */ if (a == '\b'){ printf("\\b"); continue; @@ -15,7 +15,7 @@ int a = 0; if (a == '\t'){ printf("\\t"); continue; - } else { + } else { /*There are only three possible cases here, and by the time we get here, we've tested two, hence an else statement is more efficient than doing another entire if statement*/ printf("\\\\"); continue; }