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


C Program 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;
}
Disqus Comments