Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the "pointer to a pointer" in c language? [duplicate]

How do you exactly use the operator ** (pointer to a pointer)?

I saw these operator used to declare a variable and is declared by a structure such as

struct name_of_struct **p_strutture;

What does it do exactly? What is the variable created?

How is this equivalent to *ptr[]?

What is its significance?

When is using a pointer to a pointer important in a program?

like image 263
mc8 Avatar asked Dec 12 '25 21:12

mc8


1 Answers

A pointer to a pointer basically stores the address of another pointer. A variable has a memory location and a pointer variable is used to store this address. Similarly a pointer variable has a memory address and a pointer to a pointer stores such a memory address