Skip to content

Commit ff8a667

Browse files
committed
minor tweaks
1 parent 371b3bd commit ff8a667

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

chapter01/1-11.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
* Exercise 1-11. How would you test the word count program? What kinds of input
33
* are most likely to uncover bugs if there are any?
44
*
5+
* By Faisal Saadatmand
6+
*/
7+
8+
/*
59
* Answer: According to this definition of a word (characters grouped together),
610
* means that inputs such as hyphenated words, word's with apostrophise, etc.,
711
* will be counted as one word.
8-
*
9-
* By Faisal Saadatmand
1012
*/
1113

1214
#include <stdio.h>
@@ -20,7 +22,6 @@ int main(void)
2022

2123
state = OUT;
2224
nl = nw = nc = 0;
23-
2425
while ((c = getchar()) != EOF) {
2526
++nc;
2627
if (c == '\n')
@@ -33,5 +34,6 @@ int main(void)
3334
}
3435
}
3536
printf("lines: %d words: %d character: %d\n", nl, nw, nc);
37+
3638
return 0;
3739
}

0 commit comments

Comments
 (0)