C program for Uppercase conversion of string (Manual)

#include <stdio.h>
int main()

 {
    char str[50];
    int i;

    printf("Enter the string : ");
    scanf("%s", str);

    for(i = 0; str[i] != '\0'; i++)
 {
        if(str[i] >= 'a' && str[i] <= 'z') 
{
            str[i] = str[i] - 32;
        }
    }

    printf("Upper: %s", str);

}

Comments

Popular posts from this blog

Single Program Using All Automatic String Functions

C program for subtraction of two matrices (2D Arrays)

C program for Multiplication of Two matrices