Program Console Vignaankosh.com
Execution Panel
Console is empty.
Sum of squares of first N numbers (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>
int sumOfSquares(int n) {
if(n == 1) {
return 1; // 1? = 1
}
int square = n * n;
int remainingSum = sumOfSquares(n - 1);
int total = square + remainingSum;
return total;
}
int main() {
int N = 5;
int result = sumOfSquares(N);
printf("Sum of squares of 1 to %d = %d\n", N, result);
printf("Check: 1?+2?+3?+4?+5? = 1+4+9+16+25 = %d\n", result);
return 0;
}