Pointer to Pointer in C Explained | Double Pointers, Memory & Dereferencing @LearningLad
Pointer to Pointer in C Explained | Double Pointers, Memory & Dereferencing  @LearningLad
Uploaded November 2026 | Updated December 2026, 3 hours ago
Learn Pointer to Pointer in C programming, also known as Double Pointer, and understand how to create, initialize, dereference, and use pointers that point to other pointer variables.

In this beginner-friendly C programming tutorial, we explore the concept of Pointer to Pointer using practical examples and memory diagrams.

We begin by reviewing how ordinary pointers work in C.

Using an Integer Variable named number containing the value 10, we create a Pointer to int named ptr and initialize it with the address of number.

For example:

int number = 10;
int *ptr = &number;

We explain how ptr stores the Memory Address of number and how the pointer can be used to access the Integer Object.

Next, we discuss an important concept: A Pointer Variable is also an Object in Memory, and it has its own Memory Address.

Using a conceptual Memory Diagram, we demonstrate how an Integer Variable and a Pointer Variable are stored in memory.

For illustration, we assume an Integer occupies 4 Bytes and a Pointer occupies 8 Bytes.

We explain how the pointer stores the address of the Integer Object and how another pointer can store the address of that Pointer Variable.

This introduces the concept of Pointer to Pointer, also called Double Pointer.

Next, we demonstrate how to declare and initialize a Pointer to Pointer to int.

For example:

int number = 10;
int *ptr = &number;
int **pptr = &ptr;

We explain the meaning of int **pptr and how pptr stores the address of ptr, while ptr stores the address of number.

We also discuss how to initialize a Double Pointer with nullptr in C23 and assign a valid Pointer Value later.

After that, we explore how to display Pointer Values and Memory Addresses using printf() and the %p Format Specifier.

We compare the values of pptr and &ptr, followed by ptr and &number, to understand how the pointers are connected.

Next, we introduce Double Dereferencing in C.

We explain the difference between:

1. *ptr
2. *pptr
3. **pptr

Dereferencing ptr provides access to the Integer Object.

Dereferencing pptr once provides access to the Pointer Variable ptr.

Dereferencing pptr twice provides access to the Integer Object pointed to by ptr.

We demonstrate how to modify the value of number through a Double Pointer.

For example:

**pptr = 33;

Next, we explore how Double Pointers behave when the original Pointer Variable is reassigned.

We create another Integer Variable named value and make ptr point to this new variable.

We then use **pptr to modify the new Integer Object and demonstrate why the same Double Pointer now accesses a different variable.

Using printf(), we verify the changes and display the resulting values 33 and 44.

After that, we explain how a Double Pointer itself can be reassigned to point to another Pointer to int.

We demonstrate that changing ptr and changing pptr are two different operations.

Finally, we discuss how the same Pointer to Pointer concept can be used with other data types and extended to additional levels of indirection.

This tutorial helps you understand Double Pointers, Pointer to Pointer Declarations, Memory Addresses, Pointer Initialization, Double Dereferencing, Pointer Reassignment, and Multiple Levels of Indirection in C programming.

Our Website
LearningLad.com

Social Media
Facebook facebook.com/LearningLad
Twitter twitter.com/LearningLadEdu
Instagram instagram.com/LearningLadOfficial
Pointer to Pointer in C Explained | Double Pointers, Memory & DereferencingBanking System Project in C Programming - Part 2 | View, Deposit Funds ImplementationHow to Write Characters Using the fputc Function | File Handling in C LanguageLets Build a Banking System Project using C Programming LanguageLearning C Programming Language compared to EnglishC Programming: How to Get the Memory Address of a Variable | & Operator ExplainedPointer to const in C Explained | Read-Only Access & const int Pointersfputs() Function Explained with Examples | C Programming File Handling  Tutorial for BeginnersWriting Your First Hello World Program | C Programming Course for BeginnersHow to Install Go Language golang in Manjaro LinuxHow to Setup Visual Studio Code and Run C Program | GCC Compiler, Extensions Installation ExplainedPython Program to Print Inverse Right Angle Triangle Star Number Pattern Explained | Detail Tutorial
LearningLad |

Pointer to Pointer in C Explained | Double Pointers, Memory & Dereferencing

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER