Lowercase to uppercase


#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

#vpsinghrajput

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

0 comments:

Post a Comment