Program Console Vignaankosh.com
Execution Panel
Console is empty.
R17 Replace characters in string (Recursion) 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>
void replaceChar(char str[], char oldChar, char newChar, int index) {
if(str[index] == '\0') {
return;
}
char currentChar = str[index];
if(currentChar == oldChar) {
str[index] = newChar;
}
replaceChar(str, oldChar, newChar, index + 1);
}
int main() {
char text[] = "banana";
printf("Original: %s\n", text);
replaceChar(text, 'a', 'o', 0);
printf("After replace: %s\n", text);
return 0;
}