Here's my code
Code:
#include <stdio.h>
void main(void)
{
int num=10;
int *numPtr1;
int **numPtr2;
numPtr1 = #
numPtr2 = &numPtr1;
printf("%d\n", num);
printf("%d\n", *numPtr1);
printf("%d\n", **numPtr2);
printf("%p\n", &num);
printf("%p\n", numPtr1);//here
printf("%p", numPtr2);//and here
}
Why numPtr2's address is not the same with numPtr1?
printf("%p\n", numPtr1) and printf("%p", numPtr2) needs to display the same output right??
For example, let num's address 0x7fffaca780b4. Then when I run this code, the output is
**Output**
10
10
10
0x7fffaca780b4
0x7fffaca780b4
0x7fffaca780b8 <---????