C program to change Upper case to lower case
/*by ankit gehlot
     website:ankitcguru.blogspot.com/
*/
#include<stdio.h>
int main(){
  char str[20];
  int i=0;
  printf("Enter any string :");
  scanf("%s",str);
  while(str[i]!='\0'){
            if(str[i]>=65&&str[i]<=97){
            str[i]=str[i]+32;}i++;
  }
  printf("\nThe string in lowercase is :%s ",str);
  return 0;
}
Output:-
Enter any string :ANKIT
The string in lowercase is :ankit
The string in lowercase is :ankit
Comments
Post a Comment