#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; //数组初始化,赋值为0
while ((c = getchar()) != EOF)
if (c >= '0' && c <= '9') //当检测到0-9的数字字符时,数字ndigit[i]中存放数字i出现的次数
++ndigit[c-'0'];
else if (c == ' ' || c == '\n' || c == '\t') //nwhite变量存放空格符,换行符,或者制表符出现的次数
++nwhite;
else
++nother; // 统计其他字符出现的次数
printf("digits =");
for (i = 0; i < 10; ++i)
printf(" %d", ndigit[i]);
printf(", white space = %d, other = %d\n",
nwhite, nother);
}
#include &lt;stdio.h&gt; /* count digits, white space, others */ main() { int c, i, nwhite, nother; int ndigit[10]; nwhite = nother = 0; for (i = 0; i &lt; 10; ++i...