else if(ch=' ')
b=32;
printf("%d",b);
这里啊 ,如果是非数字字符非空格,它就只是不执行b=32;而已,跟着执行printf("%d",b);
#include<stdio.h>
main()
{
int b;
char ch;
printf("Enter ch:");
ch=getchar();
if(ch>'0'&&ch<'9')
printf("%d",ch-'0');
else
if(ch=' ')
{ b=32;
printf("%d",b);
}
else
putchar(ch);
}