Answers for "C string convert All Uppercse To Lowercase"

C
1

C string convert All Uppercse To Lowercase

#include <stdio.h>
#include <string.h>

int main() {
   char s[100];
   int i;

   printf("\nEnter a string : ");
   gets(s);

   for (i = 0; s[i]!='\0'; i++) {
      if(s[i] >= 'A' && s[i] <= 'Z') {
         s[i] = s[i] + 32;
      }
   }

   printf("\nString in Lower Case = %s", s);
   return 0;
}
Posted by: Guest on May-03-2021

Code answers related to "C string convert All Uppercse To Lowercase"

Code answers related to "C"

Browse Popular Code Answers by Language