Convert string to lowercase in C

Internally characters in C are represented as an integer value known as ASCII value. Which means if we write a or any other character it is translated into a numeric value in our case it is 97 as ASCII value of a = 97. The string in converts all characters of the string into lower case letter. The scan string character by character and keep checking the index. If a character in an index is in upper case, then add 32 to convert it in lower case.

Source Code

// Write a program to convert string to lowercase in c program
int main()
        a-z  => 97-122
        A-Z  => 65-90
        0-9  => 48-57
        space => 32
    char a[100];
    int i;
    printf("\nEnter The String : ");
        if(a[i]>=65 && a[i]<=90)
    return 0;
To download raw file Click Here


Enter The String : TUTOR JOES
tutor joes

List of Programs

Sample Programs

Switch Case in C

Conditional Operators in C

Goto Statement in C

While Loop Example Programs

Looping Statements in C

For Loop Example Programs

Array Examples in C

One Dimensional Array

Two Dimensional Array in C

String Example Programs in C

Functions Example Programs in C