演示版本
VS2013
- tolower()函数
tolower()函数用于把大写字母转换为小写字母,不是大写字母的不变。
语法
int tolower(int ch);
tolower()函数的语法参数说明如下:
参数ch为待转换的字符。
tolower()函数的返回值:转换后的字符。
示例
本示例演示用tolower()函数把大写字母转换为小写字母。其具体代码如下:
#include <stdio.h> #include <ctype.h> int main() { char ch1, ch2; printf("input a character "); scanf_s("%c", &ch1); ch2 = tolower(ch1); printf("transform %c to %c ", ch1, ch2); return 0; }
阿飞
2021年7月28日