#include
void main()
{
char ch[20];
int i=0;
printf("Enter a string: ");
while((ch[i]=getchar())!='\n')
{
if((ch[i]>='a')&&(ch[i]<='z'))
{
ch[i]=ch[i]-32;
}
i++;
}
i++;
ch[i]='';
printf("The uppercase string: ");
printf(ch);
}
The output of this program will be,
Enter a string: vijay pratap singh rajput
The uppercase string: VIJAY PRATAP SINGH RAJPUT
0 comments:
Post a Comment