Declare pointer and print stored address Dry Run in C

Declare pointer and print stored address is an interactive C dry run visualizer from the Pointersintro 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.

Declare pointer and print stored address Program Code

#include <stdio.h>
int main() {
    int num = 42;
    int *ptr = &num;
    
    printf("Value of num = %d\n", num);
    printf("Address stored in ptr = %p\n", ptr);
    printf("Address of num using & = %p\n", &num);
    printf("Address of ptr itself = %p\n", &ptr);
    
    return 0;
}

View the complete Pointersintro programs page.

Program Console Declare pointer and print stored address Topic: C Vignaankosh.com
Execution Panel
Step 0/0
Console is empty.