diff --git a/KNR C/ex1_10_improved.c b/KNR C/ex1_10_improved.c index 3b0cbbc..2b4ed2d 100644 --- a/KNR C/ex1_10_improved.c +++ b/KNR C/ex1_10_improved.c @@ -4,9 +4,8 @@ * as opposed to a series of if statements*/ int main(){ -int a = 0; /*Initialized as 0 becasue getchar is called both on loop entry, and after every successful execution*/ - for (a = 0; a != EOF; a = getchar()){ + for (int a = getchar(); a != EOF; a = getchar()){ switch (a){ case '\t': printf ("\\t");