C program to Convert String to Lowercase

In this tutorial you will learn about the C program to Convert String to Lowercase and its application with practical example.

C Program to Convert String to Lowercase

In this tutorial, we will learn to create a C program that will Convert String to Lowercase in C programming.

Prerequisites

Before starting with this tutorial, we assume that you are the best aware of the following C programming topics:

  • Operators in C Programming.
  • Basic Input and Output function in C Programming.
  • Basic C programming.
  • For loop in C programming.
  • Conditional Statements in C programming.

What is a String?

The String is a collection character. The character is a single entity in the English language or in any word. These characters can be any alphabets in lower case or upper case.

The lower case means the small letters. And the upper case means the capital letters of the English language.

For Example:-

In the string “Hello”, there are five characters, they are as follows

Here,

‘H’ is a character in the Upper case.

‘e’ is a character in the lower case.

‘l’ is a character in the lowercase.

‘l’ is a character in the lower case.

‘o’ is a character in the lowercase.

Algorithm:-

Program to Convert String to Lowercase

First, we will take the input string from the user. Then will pass that String in the conditional statements to check and convert it into the lower case String.

With the help of this program, we can convert that String to lower case.

Program Code:-

Output:-

In the above program, we have first initialized the required variable.

  • str = it will hold the String value for the input.
  • i = it will hold the integer value for the loop.

Input String from the user.

Checking the given String and converting it into a lower case string.

Printing Lower case String.

In this tutorial we have learn about the C program to Convert String to Lowercase and its application with practical example. I hope you will like this tutorial.