1:toupper() 函数说明:
检查参数c,为小写字母返回对应的大写字母
2:函数原型:
int toupper(int c)
3:函数参数:
参数c,为检测整数
4:返回值:
返回转换的大写字母,若无转换将参数c值返回
5:示例:
#include <ctype.h>
int main(){
char s[]="*aBcDeFgH12345;!#$";
int i= 0;
printf("before toupper(): %s \n",s);
for( i=0; i< sizeof(s); i++){
s[i]=toupper(s[i]);
}
printf("after toupper():%s \n", s );
return 0;
}
6:输出结果:
可参考tolower函数:https://mp.csdn.net/mp_blog/creation/editor/141109783