过路人帮忙找下错误(非常小滴程序)
#include "stdio.h"main()
{int a,b,c,d;
printf("输入一串字符:\n");
while(getchar()!='\0')
{switch(sizeof(getchar()))
{case 8:a++;break;
case 16:b++;break;
case 32:c++;break;
default :d++;
}
}
printf("字符的个数为:%d\n",a);
printf("整数的个数为:%d\n",b);
printf("实数的个数为:%d\n",c);
printf("其它个数为:%d\n",d);
}