C语言常用函数-toupper()将字符转换为大写英文字母函数

2021-08-02 01:56

阅读:634

标签:常用函数   c语言   printf   input   int   英文字母   英文   cte   返回值   演示版本 VS2013 toupper()函数 toupper()函数用于把小写字母转换为大写字母,不是小写字母的不变。 语法 int toupper(int ch); toupper()函数的语法参数说明如下: 参数ch为待转换的字符。 toupper()函数的返回值:转换后的字符。 示例 本示例演示用toupper()函数把小写字母转换为大写字母。其具体代码如下: #include #include int main() { char ch1, ch2; printf("input a character\n"); scanf_s("%c", &ch1); ch2 = toupper(ch1); printf("transform %c to %c\n", ch1, ch2); return 0; }   阿飞 2021年7月28日C语言常用函数-toupper()将字符转换为大写英文字母函数标签:常用函数   c语言   printf   input   int   英文字母   英文   cte   返回值   原文地址:https://www.cnblogs.com/nxopen2018/p/15072957.html


评论


亲,登录后才可以留言!