A pointer to a pointer to an integer
时间: 2024-03-16 15:17:20 浏览: 24
A pointer to a pointer to an integer is a data type used in programming languages like C and C++. It is a variable that stores the memory address of another pointer variable, which in turn stores the memory address of an integer variable.
The syntax for declaring a pointer to a pointer to an integer is:
```c
int **p;
```
In this declaration, the double asterisk indicates that it is a pointer to a pointer. To assign a value to this pointer, you would need to do something like:
```c
int a = 10;
int *p1 = &a;
int **p2 = &p1;
```
In this example, `p1` is a pointer that stores the memory address of `a`, and `p2` is a pointer that stores the memory address of `p1`. Therefore, `**p2` would give you the value of `a` (which is 10).