个人网站开发人员,江苏优化网站价格,莲都区建设局网站,广告联盟官网1、字符操作 在头文件ctype.h中 1、字符分类 islower(int a) 是否是小写 isupper(int a) 是否是大写 2、字符转换 int tolower(int ch)转换成小写 int woupper(int ch)转换成大写 2、测试Demo #include stdio.h
#include ctype.hint m…1、字符操作
在头文件ctype.h中 1、字符分类 islower(int a) 是否是小写 isupper(int a) 是否是大写 2、字符转换 int tolower(int ch)转换成小写 int woupper(int ch)转换成大写 2、测试Demo #include stdio.h
#include ctype.hint main()
{//字符分类char a = 'A';printf("islower(%c) is %d\n", a, islower(a));char b = 'B';printf("isupper(%c) is %d\n", b, isupper(b));char c = 'C';//是不是字母printf("isalpha(%c) is %d\n", c, isalpha(c));//字符转换char d = 'D';printf("tolower(%c) is %c\n", d, tolower(d));char e = 'e';printf("toupper(%c) is %c\n", e, toupper(c)