C Programming
Computer Programming

C program to convert lowercase string to uppercase string



Write a program in C to convert lowercase string to uppercase string

\* C program to convert lowercase string to uppercase string *\

# include < stdio.h >
# include < conio.h >
# include < string.h >
int   main( )
{

char str[25] ;
int i ;
printf("\n Enter the string: " ) ;
scanf("%s", str) ;
for(i=0; i<=strlen(str); i++)
{
      if(str[i] >= 97 && str[i] <= 122 )
            str[i] = str[i] - 32 ;
}
printf("\n Upper Case String is: %s", str) ;
return 0 ;

}

Output of Program :

Output of C program to convert lowercase string to uppercase string