#include<cstdio>
using namespace std;
int main()
{
int a[10] = {1,2,3,4,5,6,7,8,9,10};
int *p;
p = a;
printf("%d\n",*(a + 2));
printf("%d\n",*(p + 2));// *(p + 2) 等同于 *(a + 2)
return 0;
}
#include<cstdio>
using namespace std;
int main()
{
int a[10] = {1,2,3,4,5,6,7,8,9,10};
int *p;
p = a;
printf("%d\n",*(a + 2));
printf("%d\n",*(p + 2));// *(p + 2) 等同于 *(a + 2)
return 0;
}