// Online C compiler to run C program online
#include <stdio.h>
int main() {
char arr[2] = {1, 2};
char *parr0 = NULL;
char *parr1 = NULL;
char **pparr0 = NULL;
char **pparr1 = NULL;
printf("%p %p %p\n", arr, &arr[0], &arr);
printf("%p %p %p\n", arr + 1, (&arr[0]) + 1, (&arr) + 1);
parr0 = arr;
parr1 = &arr[0];
printf("%p %p %p %p\n", parr0, arr, parr1, &arr[0]);
pparr0 = &parr0;
pparr1 = &parr1;
printf("%p %p %p %p\n", *pparr0, parr0, *pparr1, parr1);
printf("%d %d\n", *pparr0[0], *pparr1[0]);
printf("%d %d %d %d\n", **pparr0, **pparr1, *(*pparr0 + 1), *(*pparr1 + 1));
printf("%p %p\n", pparr0[0], pparr1[0]);
return 0;
}
标签:arr,parr0,parr1,pparr1,pparr0,数组,printf,指针
From: https://www.cnblogs.com/archerqvq/p/18372987