toupper() 函数将小写字母转换为大写字母。语法:int toupper(int c)参数:c - 要转换的字符返回值:大写字母或 c 本身仅对 ASCII 字符集中的字母有效locale-aware,转换可能因 locale 不同而异
C 语言中 toupper() 函数的使用
toupper() 函数用途:
toupper() 函数将小写字母转换为大写字母。
语法:
立即学习“C语言免费学习笔记(深入)”;
int toupper(int c);
参数:
返回值:
示例:
char c = 'a'; char upper = toupper(c); printf("小写字母 %c 的大写字母是 %c\n", c, upper);
输出:
小写字母 a 的大写字母是 A
注意事项:
以上就是c语言中toupper怎么用的详细内容,更多请关注php中文网其它相关文章!
C语言怎么学习?C语言怎么入门?C语言在哪学?C语言怎么学才快?不用担心,这里为大家提供了C语言速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号