Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this notation mean in C?

Tags:

c

pointers

int *w;
int **d;

d = &w;

What does the **d store exactly?

like image 985
goe Avatar asked Dec 09 '22 19:12

goe


1 Answers

After the assignment, **d is the same as *w. d is a pointer to a pointer to an integer; the pointer to an integer that it points to is w. So *d is w, and **d is *w.

like image 51
Michael Ekstrand Avatar answered Dec 24 '22 02:12

Michael Ekstrand