#include <stdio.h>
void jisuan(char str[])
{int n=0,i=0,j=0,k=0;
while(str[n]!='\0')
{
if('a'<=str[n]&&str[n]<='z'||'A'<=str[n]&&str[n]<='Z')i++;
else if('0'<=str[n]&&str[n]<='9')j++;
else k++;
n++;}
printf("%d,%d,%d\n\n",I,j,k);}
int main()
{char *pc,a[40];
p=a;
scanf("%s",p);
jisuan(p);
return 0;}
(1)分析其中涉及到的字符处理为什么要用ASCII码值处理
(2)将while循环改为for循环
(3)简述本程序执行流程
(4)将程序中被调用函数jisuan的形参由数组名改为指针变量,完成相同功能函数jisuan的代码编写
04-14
899
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)