小白教程
所有教程
关于
Search
172.69.7.56
172.69.7.56
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“C function toupper”的源代码
本页内容
上一节:
C_function_tolower
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:int toupper(int c)}}[[Category:c standard library ctype h|13]] = C 库函数 - toupper() = [[c standard library ctype h|C 标准库 - <ctype.h>]] == 描述 == C 库函数 '''int toupper(int c)''' 把小写字母转换为大写字母。 == 声明 == 下面是 toupper() 函数的声明。 <pre> int toupper(int c); </pre> == 参数 == * '''c''' -- 这是要被转换为大写的字母。 == 返回值 == 如果 c 有相对应的大写字母,则该函数返回 c 的大写字母,否则 c 保持不变。返回值是一个可被隐式转换为 char 类型的 int 值。 下面的实例演示了 toupper() 函数的用法。 <pre> #include <stdio.h> #include <ctype.h> int main() { int i = 0; char c; char str[] = "xiaobai"; while(str[i]) { putchar (toupper(str[i])); i++; } return(0); } </pre> 让我们编译并运行上面的程序,这将产生以下结果: <pre> XiaoBai.Wang </pre> [[c standard library ctype h|C 标准库 - <ctype.h>]]
返回至“
C function toupper
”。
上一节:
C_function_tolower