Tech Study

C program to Change string to lower case without strlwr

Introduction

C program to Change string to lower case without strlwr. I have used Code:: Blocks compiler for debugging purpose. But you can use any C programming language compiler as per your availability.

#include <stdio.h>

   void functionlower(char []);

   int main()
   {
      char string[100];

      printf("Enter a string to convert it into lower case\n");
      gets(string);

      functionlower(string); // calling functionlower

      printf("Entered string in lower case is %s", string);

      return 0;
   }

   void functionlower(char s[]) {
      int c = 0;

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

Result

C program to Change string to lower case without strlwr
C program to Change string to lower case without strlwr

TaggedC program to Change string to lower case without strlwr

Java Final keyword

Introduction : java final keyword The final keyword present in Java programming language is generally used for restricting the user. …

Read more

C++ Memory Management: new and delete

C++ Memory Management We know that arrays store contiguous and the same type of memory blocks, so memory is allocated …

Read more