c语言大小写转换函数
发布时间: 2023-08-11 23:13:35
A. C语言大小写字母转换
在C语言中转换大小写字母,可用ctype.h头文件中声明的函数toupper和tolower。
toupper:
int toupper(int c);
若c为小写字母,则将其转换为大写字母;否则,不转换,直接返回c。
tolower:
int tolower(int c);
若c为大写字母,则将其转换为小写字母;否则,不转换,直接返回c。
热点内容
A. C语言大小写字母转换
在C语言中转换大小写字母,可用ctype.h头文件中声明的函数toupper和tolower。
toupper:
int toupper(int c);
若c为小写字母,则将其转换为大写字母;否则,不转换,直接返回c。
tolower:
int tolower(int c);
若c为大写字母,则将其转换为小写字母;否则,不转换,直接返回c。