- Create a string called str to input your sentence. As usual, the last character will be a null character:
char str[255];
- Enter a sentence of your choice:
printf("Enter a sentence: ");
- Execute the gets function to accept the sentence with blank spaces between the words, and initialize the i variable to 0, since each character of the sentence will be accessed through i:
gets(str);i=0
- Execute a while loop to access each letter of the sentence one by one, until the null character in the sentence is reached:
while(str[i]!='\0'){ { … }}i++;
- Check each letter to verify whether it is a lowercase vowel. If the accessed character is a lowercase vowel, then the value 32 is subtracted from the ASCII value of that vowel to convert ...