Program Console Vignaankosh.com
Execution Panel
Console is empty.
R18 Count vowels recursively is an interactive C dry run visualizer from the Recursion programs section. Study the source code, then use the execution controls to follow each step, variable update, highlighted line, and console output.
This page provides a browser-based dry run with source-code highlighting, auto-scroll, voice narration controls, and execution output for learning the program step by step.
#include <stdio.h>
int isVowel(char ch) {
ch = (ch >= 'A' && ch <= 'Z') ? ch + 32 : ch;
return (ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u');
}
int countVowels(char str[], int index) {
if(str[index] == '\0') {
return 0;
}
char currentChar = str[index];
int countFromRest = countVowels(str, index + 1);
int currentCount;
if(isVowel(currentChar)) {
currentCount = 1;
} else {
currentCount = 0;
}
int totalCount = currentCount + countFromRest;
return totalCount;
}
int main() {
char text[] = "Programming is Fun";
int vowels = countVowels(text, 0);
printf("String: %s\n", text);
printf("Number of vowels: %d\n", vowels);
return 0;
}