Header Ads Widget

Responsive Advertisement

Ticker

6/recent/ticker-posts

WAP to convert the string from upper case to lower case?

  WAP to convert the string from upper case to lower case?  
 #include<stdio.h>  
 #include<string.h>  
 int main()  
 {  
  char string[50];  
  int j;  
  printf("Enter any string->");  
  scanf("%s",string);  
  printf("The string is->%s",string);  
  for(j=0;j<=strlen(string);j++)  
 {  
    if(string[j]>=65&&string[j]<=90)  
     string[j]=string[j]+32;  
  }  
  printf("\nThe string in lower case is->%s",string);  
  return 0;  
 } 

 

Post a Comment

0 Comments