书中本章的例子的目的是来数每一个数(0-9),空格字符(空格,制表符,换行符) 以及 其它所有字符分别出现的次数。 例子程序代码如下: #include <stdio.h> /* count digits, white space, others */ main() { int c, i, nwhite, nother; int ndigit[10]; nwhite = nother = 0; for (i=0; i<10; i++) { ndigit[i]=0; } while ((c=getchar()) != EOF) { if (c>='0' && c&