-3
如何使用toupper
函数转换字符串?这没有奏效。字符串不能将小写字母转换为大写字母作为c程序
#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main(){
char ch[20];
printf("\nEnter Your String :");
gets(ch);
int i=0;
for(i=0;ch[i] !='\0';i++)
{
putchar(toupper(ch[i]));
putchar(ch[i]);
}
return 0;
}
这个程序输出大写和小写我只是想大写output.i着抓住我的逻辑fault.please帮助我获得清晰的逻辑概念
它不起作用?你期望什么产出,你会得到什么? –
什么不起作用?你会得到什么输入和输出? – Myforwik
您的程序[按编码工作:]](http://ideone.com/OB1wi)。 – dasblinkenlight