C Programming
Computer Programming

C program to convert uppercase string to lowercase string



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

\* C program to convert uppercase string to lowercase 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]>=65&&str[i] <= 90 )
            str[i] = str[i] + 32 ;
}
printf( "\n Lower Case String is: %s", str ) ;
return 0 ;

}

Output of Program :

Output of C program to convert uppercase string to lowercase string