Code, Algorithm, Flowchart, Output for finding vowels in string
In this blog we will see the Code, Algorithm, Flowchart, Output for finding vowels and total number of characters in string. Algorithm : 1] Start 2] Set the count to 0 3] Loop through the string until it reaches a null character 4] Compare each character to the vowels a, e, i, o, u or A, E, I, O, U. 5] If both are equal, increase the count by one. 6] Print the count of each vowel at the end. 7] Stop Flowchart: Output : Enter a string: ABCDEFGHIJKLMNOPQRSTUVWXYZ Total number of characters: 26 A: 1 E: 1 I: 1 O: 1 U: 1 Code : #include <stdio.h> int main () { char str [ 100 ]; int i = 0 , count = 0 ; int A = 0 , E = 0 , I = 0 , O = 0 , U = 0 ; printf ( "Enter a string: " ); fgets ( str , 10 , stdin ); for ( int i = 0 ; str [ i ] != ' \0 ' ; i ++ ) { count ++ ; ...