C Program to convert a string into its corresponding lower case format

This program will ask for a string to the user at first. The program will take in the input with any case letters. No matter what the cases are the letters in the string the program will convert them into their corresponding lower case format. In order to understand this program well, you need to have prior knowledge of the following topics.

How to convert a string into its corresponding lower case in C?

Following is the code that will illustrate how the function strlwr() can be used for converting any string into its lower case.

Code:

#include<stdio.h>
#include<string.h>
int main(){
	char n[100];
	puts("Enter the string: ");
	gets(n);
	printf("String in the lowercase form is = %s",strlwr(n));
}

The above program illustrates the output as below:

Output:

Enter the string:
HouSE
String in the lowercase form is = house
SHARE C Program to convert a string into its corresponding lower case format

You may also like...

Leave a Reply

Your email address will not be published.

Share