Pointer to pointer (double pointer basics) Dry Run in C

Pointer to pointer (double pointer basics) 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.

Pointer to pointer (double pointer basics) Program Code

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

View the complete Pointersintro programs page.

Program Console Pointer to pointer (double pointer basics) Topic: C Vignaankosh.com
Execution Panel
Step 0/0
Console is empty.