国家二级计算机改错题.doc
文本预览下载声明
01下列给定程序中,函数fun的功能是:分别统计字符串中大写字母和小写字母的个数。例如,给字符串s输入:AaaaBBb123CCccccd,则应输出结果:upper=5,1ower=9。#includeconio.h#includestdio.h/*********found***********/void fun(char *s,int a,int b){?while(*s){??/*********found***********/??if(*s=A*s=Z)?a++;?if(*s=a *s=z)?b++;?s++;?}}main(){?char s[100];?intupper=0,
显示全部