toupper ) )函数的用法及其详细说明: C库函数inttoupper(intc )将小写字符转换为大写字符。 声明: inttoupper(intc ); 参数: c这是要转换成大写的字符。 返回值:如果有与c对应的大写字母,函数返回c的大写字母。 否则,c保持不变。 返回值是可以隐式转换为char类型的int值。 例如:
# include stdio.h # include ctype.hint main () { int i=0; char c; char str[]='runoob '; wile(str[I] ) Putchar ) toupper ) str[I] ); I; } return 0; }编译的结果如下。
RUNOOB