SlideShare a Scribd company logo
Double Pointer (Pointer to
pointer)
Prepared By: Mr. Sangram A. Patil
Assistant Professor PVPIT,Budhgaon
Double Pointer
 pointer holds the address of another variable of same type.
 When a pointer holds the address of another pointer then such type of pointer is
known as pointer-to-pointer or double pointer.
 The first pointer is used to store the address of the variable. And the second
pointer is used to store the address of the first pointer. That is why they are also
known as double pointers.
How to declare a pointer to pointer in C?
 Declaring Pointer to Pointer is similar to declaring pointer in C. The difference is
we have to place an additional ‘*’ before the name of pointer.
 Syntax:
int **ptr; // declaring double pointers
 Here, we have used two indirection operator(*) which stores and points to the
address of a pointer variable i.e, int *
*.
int a =10;
int *p1;
int **p2;
p1 = &a;
P2=&p1;
Double pointer (pointer to pointer)
Double pointer (pointer to pointer)
Ad

More Related Content

What's hot (20)

Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python
amiable_indian
 
C++ programming function
C++ programming functionC++ programming function
C++ programming function
Vishalini Mugunen
 
File in C language
File in C languageFile in C language
File in C language
Manash Kumar Mondal
 
Pointers in c++
Pointers in c++Pointers in c++
Pointers in c++
sai tarlekar
 
DATABASE MANAGEMENT SYSTEM LAB.pdf
DATABASE MANAGEMENT SYSTEM LAB.pdfDATABASE MANAGEMENT SYSTEM LAB.pdf
DATABASE MANAGEMENT SYSTEM LAB.pdf
Prof. Dr. K. Adisesha
 
RECURSION IN C
RECURSION IN C RECURSION IN C
RECURSION IN C
v_jk
 
Pointers in C Programming
Pointers in C ProgrammingPointers in C Programming
Pointers in C Programming
Jasleen Kaur (Chandigarh University)
 
Strings
StringsStrings
Strings
Imad Ali
 
C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1
Vikram Nandini
 
Data Types In C
Data Types In CData Types In C
Data Types In C
Simplilearn
 
POINTERS IN C MRS.SOWMYA JYOTHI.pdf
POINTERS IN C MRS.SOWMYA JYOTHI.pdfPOINTERS IN C MRS.SOWMYA JYOTHI.pdf
POINTERS IN C MRS.SOWMYA JYOTHI.pdf
SowmyaJyothi3
 
Structure in c language
Structure in c languageStructure in c language
Structure in c language
sangrampatil81
 
Presentation on pointer.
Presentation on pointer.Presentation on pointer.
Presentation on pointer.
Md. Afif Al Mamun
 
Printf and scanf
Printf and scanfPrintf and scanf
Printf and scanf
gidc engineering college
 
Structures in c++
Structures in c++Structures in c++
Structures in c++
Swarup Boro
 
Python basics
Python basicsPython basics
Python basics
Hoang Nguyen
 
Evaluation of postfix expression using stack
Evaluation of postfix expression using stackEvaluation of postfix expression using stack
Evaluation of postfix expression using stack
shubhajitCHATTERJEE2
 
Functions in c
Functions in cFunctions in c
Functions in c
sunila tharagaturi
 
Loops c++
Loops c++Loops c++
Loops c++
Shivani Singh
 
C Programming : Pointers and Strings
C Programming : Pointers and StringsC Programming : Pointers and Strings
C Programming : Pointers and Strings
Selvaraj Seerangan
 

Similar to Double pointer (pointer to pointer) (20)

Pointers in C How to Use Pointers .pptx
Pointers in C  How to Use Pointers .pptxPointers in C  How to Use Pointers .pptx
Pointers in C How to Use Pointers .pptx
balraj233251
 
Pointers in c
Pointers in cPointers in c
Pointers in c
Mohd Arif
 
Pointers in C
Pointers in CPointers in C
Pointers in C
Vijayananda Ratnam Ch
 
Pointers in C language
Pointers  in  C languagePointers  in  C language
Pointers in C language
Infinity Tech Solutions
 
PSPC--UNIT-5.pdf
PSPC--UNIT-5.pdfPSPC--UNIT-5.pdf
PSPC--UNIT-5.pdf
ArshiniGubbala3
 
INTRODUCTION TO POINTER IN c++ AND POLYMORPHISM
INTRODUCTION TO POINTER IN c++ AND POLYMORPHISMINTRODUCTION TO POINTER IN c++ AND POLYMORPHISM
INTRODUCTION TO POINTER IN c++ AND POLYMORPHISM
M.H.Saboo Siddik Polytechnic
 
Pointer
PointerPointer
Pointer
DharmaKumariBhandari
 
pointers.pptx
pointers.pptxpointers.pptx
pointers.pptx
zeenatparveen24
 
Pointer in c
Pointer in cPointer in c
Pointer in c
sangrampatil81
 
Pointer in c
Pointer in c Pointer in c
Pointer in c
sangrampatil81
 
VIT351 Software Development VI Unit3
VIT351 Software Development VI Unit3VIT351 Software Development VI Unit3
VIT351 Software Development VI Unit3
YOGESH SINGH
 
Structured programming Unit-6-Strings-Unit-8-Pointer.pptx
Structured programming Unit-6-Strings-Unit-8-Pointer.pptxStructured programming Unit-6-Strings-Unit-8-Pointer.pptx
Structured programming Unit-6-Strings-Unit-8-Pointer.pptx
SuryaBasnet1
 
Arrays to arrays and pointers with arrays.pptx
Arrays to arrays and pointers with arrays.pptxArrays to arrays and pointers with arrays.pptx
Arrays to arrays and pointers with arrays.pptx
Ramakrishna Reddy Bijjam
 
POINTER TO POINTER.pptx
POINTER TO POINTER.pptxPOINTER TO POINTER.pptx
POINTER TO POINTER.pptx
srikanthreddyn111
 
pointers.pptx
pointers.pptxpointers.pptx
pointers.pptx
janithlakshan1
 
Pointer in c++ part1
Pointer in c++ part1Pointer in c++ part1
Pointer in c++ part1
Subhasis Nayak
 
pointer.pptx module of information technology
pointer.pptx module of information technologypointer.pptx module of information technology
pointer.pptx module of information technology
jolynetomas
 
PPS 9.9.POINTERS IDEA OF POINTERS, DEFINING POINTERS, USE OF POINTERS IN SEL...
PPS 9.9.POINTERS  IDEA OF POINTERS, DEFINING POINTERS, USE OF POINTERS IN SEL...PPS 9.9.POINTERS  IDEA OF POINTERS, DEFINING POINTERS, USE OF POINTERS IN SEL...
PPS 9.9.POINTERS IDEA OF POINTERS, DEFINING POINTERS, USE OF POINTERS IN SEL...
Sitamarhi Institute of Technology
 
Pointers-Computer programming
Pointers-Computer programmingPointers-Computer programming
Pointers-Computer programming
nmahi96
 
Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...
Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...
Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...
Jayanshu Gundaniya
 
Pointers in C How to Use Pointers .pptx
Pointers in C  How to Use Pointers .pptxPointers in C  How to Use Pointers .pptx
Pointers in C How to Use Pointers .pptx
balraj233251
 
Pointers in c
Pointers in cPointers in c
Pointers in c
Mohd Arif
 
VIT351 Software Development VI Unit3
VIT351 Software Development VI Unit3VIT351 Software Development VI Unit3
VIT351 Software Development VI Unit3
YOGESH SINGH
 
Structured programming Unit-6-Strings-Unit-8-Pointer.pptx
Structured programming Unit-6-Strings-Unit-8-Pointer.pptxStructured programming Unit-6-Strings-Unit-8-Pointer.pptx
Structured programming Unit-6-Strings-Unit-8-Pointer.pptx
SuryaBasnet1
 
Arrays to arrays and pointers with arrays.pptx
Arrays to arrays and pointers with arrays.pptxArrays to arrays and pointers with arrays.pptx
Arrays to arrays and pointers with arrays.pptx
Ramakrishna Reddy Bijjam
 
pointer.pptx module of information technology
pointer.pptx module of information technologypointer.pptx module of information technology
pointer.pptx module of information technology
jolynetomas
 
PPS 9.9.POINTERS IDEA OF POINTERS, DEFINING POINTERS, USE OF POINTERS IN SEL...
PPS 9.9.POINTERS  IDEA OF POINTERS, DEFINING POINTERS, USE OF POINTERS IN SEL...PPS 9.9.POINTERS  IDEA OF POINTERS, DEFINING POINTERS, USE OF POINTERS IN SEL...
PPS 9.9.POINTERS IDEA OF POINTERS, DEFINING POINTERS, USE OF POINTERS IN SEL...
Sitamarhi Institute of Technology
 
Pointers-Computer programming
Pointers-Computer programmingPointers-Computer programming
Pointers-Computer programming
nmahi96
 
Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...
Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...
Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...
Jayanshu Gundaniya
 
Ad

More from sangrampatil81 (20)

Deadlock
DeadlockDeadlock
Deadlock
sangrampatil81
 
Memory Management
Memory ManagementMemory Management
Memory Management
sangrampatil81
 
virtual memory
virtual memoryvirtual memory
virtual memory
sangrampatil81
 
IO hardware
IO hardwareIO hardware
IO hardware
sangrampatil81
 
File system structure
File system structureFile system structure
File system structure
sangrampatil81
 
File management
File managementFile management
File management
sangrampatil81
 
Disk structure
Disk structureDisk structure
Disk structure
sangrampatil81
 
Directory structure
Directory structureDirectory structure
Directory structure
sangrampatil81
 
Directory implementation and allocation methods
Directory implementation and allocation methodsDirectory implementation and allocation methods
Directory implementation and allocation methods
sangrampatil81
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
sangrampatil81
 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlock
sangrampatil81
 
Semaphore
SemaphoreSemaphore
Semaphore
sangrampatil81
 
Monitors
MonitorsMonitors
Monitors
sangrampatil81
 
Classical problems of process synchronization
Classical problems of process synchronizationClassical problems of process synchronization
Classical problems of process synchronization
sangrampatil81
 
System programs
System programsSystem programs
System programs
sangrampatil81
 
System programs
System programsSystem programs
System programs
sangrampatil81
 
Services and system calls
Services and system callsServices and system calls
Services and system calls
sangrampatil81
 
Operating system structure
Operating system structureOperating system structure
Operating system structure
sangrampatil81
 
Operating system deign and implementation
Operating system deign and implementationOperating system deign and implementation
Operating system deign and implementation
sangrampatil81
 
Pointer to array and structure
Pointer to array and structurePointer to array and structure
Pointer to array and structure
sangrampatil81
 
Ad

Recently uploaded (20)

Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Foundation Models for Time Series : A Survey
Foundation Models for Time Series : A SurveyFoundation Models for Time Series : A Survey
Foundation Models for Time Series : A Survey
jayanthkalyanam1
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Tools of the Trade: Linux and SQL - Google Certificate
Tools of the Trade: Linux and SQL - Google CertificateTools of the Trade: Linux and SQL - Google Certificate
Tools of the Trade: Linux and SQL - Google Certificate
VICTOR MAESTRE RAMIREZ
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Top 10 Data Cleansing Tools for 2025.pdf
Top 10 Data Cleansing Tools for 2025.pdfTop 10 Data Cleansing Tools for 2025.pdf
Top 10 Data Cleansing Tools for 2025.pdf
AffinityCore
 
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
Lionel Briand
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Odoo ERP for Education Management to Streamline Your Education Process
Odoo ERP for Education Management to Streamline Your Education ProcessOdoo ERP for Education Management to Streamline Your Education Process
Odoo ERP for Education Management to Streamline Your Education Process
iVenture Team LLP
 
Creating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdfCreating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdf
Applitools
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Foundation Models for Time Series : A Survey
Foundation Models for Time Series : A SurveyFoundation Models for Time Series : A Survey
Foundation Models for Time Series : A Survey
jayanthkalyanam1
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Tools of the Trade: Linux and SQL - Google Certificate
Tools of the Trade: Linux and SQL - Google CertificateTools of the Trade: Linux and SQL - Google Certificate
Tools of the Trade: Linux and SQL - Google Certificate
VICTOR MAESTRE RAMIREZ
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Top 10 Data Cleansing Tools for 2025.pdf
Top 10 Data Cleansing Tools for 2025.pdfTop 10 Data Cleansing Tools for 2025.pdf
Top 10 Data Cleansing Tools for 2025.pdf
AffinityCore
 
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
Lionel Briand
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Odoo ERP for Education Management to Streamline Your Education Process
Odoo ERP for Education Management to Streamline Your Education ProcessOdoo ERP for Education Management to Streamline Your Education Process
Odoo ERP for Education Management to Streamline Your Education Process
iVenture Team LLP
 
Creating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdfCreating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdf
Applitools
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 

Double pointer (pointer to pointer)

  • 1. Double Pointer (Pointer to pointer) Prepared By: Mr. Sangram A. Patil Assistant Professor PVPIT,Budhgaon
  • 2. Double Pointer  pointer holds the address of another variable of same type.  When a pointer holds the address of another pointer then such type of pointer is known as pointer-to-pointer or double pointer.  The first pointer is used to store the address of the variable. And the second pointer is used to store the address of the first pointer. That is why they are also known as double pointers.
  • 3. How to declare a pointer to pointer in C?  Declaring Pointer to Pointer is similar to declaring pointer in C. The difference is we have to place an additional ‘*’ before the name of pointer.  Syntax: int **ptr; // declaring double pointers  Here, we have used two indirection operator(*) which stores and points to the address of a pointer variable i.e, int * *.
  • 4. int a =10; int *p1; int **p2; p1 = &a; P2=&p1;