function that changes uppercase to lowercase in c code example

Example 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;
}

Example 2: in c, is class uppercase or lowercase

class /*class name here*/ {
 
  /* inser all the things you do in a class
  here because you can and that is what you 
  do*/
  
}

Tags:

Cpp Example