Check palindrome number Dry Run in C

Check palindrome number is an interactive C dry run visualizer from the While 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.

Check palindrome number Program Code

#include <stdio.h>
int main() {
    int num, original, rev = 0;
    
    printf("Enter a number: ");
    scanf("%d", &num);
    original = num;
    
    while(num > 0) {
        rev = rev * 10 + (num % 10);
        num = num / 10;
    }
    
    if(original == rev)
        printf("%d is a palindrome\n", original);
    else
        printf("%d is not a palindrome\n", original);
    return 0;
}

View the complete While programs page.

Program Console Check palindrome number Topic: C Vignaankosh.com
Execution Panel
Step 0/0
Console is empty.