13 lines
245 B
C
13 lines
245 B
C
|
#include <stdio.h>
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
int arr[10] = {1, 2, 3, 4, 5, 6};
|
||
|
int *p = arr;
|
||
|
|
||
|
int *q = p + 2; // 指向 arr 数组的第三个元素地址
|
||
|
int x = *q + 100; // *(p + 2) + 100
|
||
|
|
||
|
printf("x=%d\n", x); // 103
|
||
|
return 0;
|
||
|
}
|