How can I convert a string using the toupper
function? This did not work.
#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;
}
this program output both upper and lowercase i just want to uppercase output.i cant catch my logic fault.please help me to get clear logic concept