#include <stdio.h>

int main() {
   char string1[255];//Declaring a character array to store the sentence
   int i;

   printf("Input a sentence: ");
   gets(string1);// Input a sentence and store it in string1

   printf("The original string :\n");
   puts(string1);// Put the original sentence

   i=0;
   // Loop through the string until the end of the string ('\0') is reached
    while(string1[i] !='\0') {
        // Convert lowercase vowels to uppercase by subtracting 32 from their ASCII values
        if (string1[i]=='a' || string1[i]=='e' || string1[i]=='i' || string1[i]=='o' || string1[i]=='u'){
            string1[i]=string1[i]-32;
        }
        i++;//Move to the next character in the string
    }

    printf("After converting vowels into upercase , the sentence becomes : \n");
    puts(string1);//Print the modified sentence with upercase vowels
    return 0;
}    
    
    

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: