Convert string to uppercase in C

In the program, the actual code of conversion of string to upper case is present in main() function. An array of char type s[100] is declared which will store the entered string by user. The string in converts all characters of the string into upper case letter. The scan string character by character and keep checking the index. If a character in an index is in lower case, then subtract 32 to convert it in upper case.

Source Code

// Write a program to convert string to upper case in c program
int main()
    char a[100];
    int i;
    printf("\nEnter The String : ");
        if(a[i]>=97 && a[i]<=122)
    return 0;
To download raw file Click Here


Enter The String : 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