With all due respect to Mitakeet's post (he correctly pointed out your problems), I would add that looking in my copy of K&R2, it seems that your code should look like the following:
Code:
#include<stdio.h>
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<='9')
++ndigit[c-'0'];
else
if (c==' ' || c=='\n' || c=='\t')
++nwhite;
else
++nother;
printf("Ta psifia einai");
for( i = 0 ; i < 10 ; ++i)
printf(" %d",ndigit[i]);
printf(", ta leyka diastimata einai %d, kai oi alloi xaraktires %d", nwhite, nother);
printf(".Sas eyxaristoume pou mas kalesate.\n");
}
edit:: Dave, you type too fast!