Pointer to Pointer

Medium Pointer Fundamentals
Solve in Playground →

Problem Statement

Write a C program to demonstrate pointer-to-pointer (double pointer) usage by modifying or printing a variable’s value through a double pointer.

Input Format

An integer value.

Output Format

Print the value accessed via the double pointer.

Constraints

Standard integer limits

Sample Input

555

Sample Output

555

Explanation

Use a pointer to point to a pointer variable (`int **pptr = &ptr`), then dereference twice (`**pptr`) to access the value.

Starter Code

#include <stdio.h>

int main() {
    int num;
    if (scanf("%d", &num) == 1) {
        int *ptr = &num;
        int **pptr = &ptr;
        // Write your code here to print value using double pointer
    }
    return 0;
}

Limits

  • Time Limit: 1s
  • Memory Limit: 256MB

Embedded C Programming

Updated: March 15, 2026
Intermediate

Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used