Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

C program to convert UPPERCASE string to lowercase!

In this post, let’s see how to get the UPPERCASE string from the user and then convert to a lowercase string with space in C Program.

Let’s write the example C program to Convert Uppercase String to lowercase.

/*
* Convert uppercase to lowercase in C program
* We need to use tolower() function
* so lets include ctype.h
*/
#include
#include
#include

int main() {
	
	char inputStr[50], outputStr[50];
	int i;
	
	//get the input from the user including space
	printf("Enter something in CAPS: ");
	scanf("%[^\n]%*c", inputStr);
	
	for(i=0; i 

Sample output of the above example snippet is,

Enter something in CAPS: AGUR CHAND BABU
lowercase: agur chand babu
--------------------------------
Process exited after 4.795 seconds with return value 26
Press any key to continue . . .

I hope this simple C program helps you to Convert Uppercase to Lowercase.

The post C program to convert UPPERCASE string to lowercase! appeared first on TutorialsMade.



This post first appeared on TutorialsMade - Ultimate Tutorial, please read the originial post: here

Share the post

C program to convert UPPERCASE string to lowercase!

×

Subscribe to Tutorialsmade - Ultimate Tutorial

Get updates delivered right to your inbox!

Thank you for your subscription

×