Program Console Vignaankosh.com
Execution Panel
Console is empty.
R15 Reverse array (in-place using 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 reverseArray(int arr[], int left, int right) {
if(left >= right) return;
int temp = arr[left];
arr[left] = arr[right];
arr[right] = temp;
reverseArray(arr, left + 1, right - 1);
}
void printArray(int arr[], int n) {
for(int i = 0; i < n; i++) {
printf("%d ", arr[i]);
}
printf("\n");
}
int main() {
int arr[] = {10, 20, 30, 40, 50, 60};
int n = sizeof(arr) / sizeof(arr[0]);
printf("Original: ");
printArray(arr, n);
reverseArray(arr, 0, n - 1);
printf("Reversed: ");
printArray(arr, n);
return 0;
}