struct st
{
int n;
char name[10];
};
struct st a[3]={5,"li",7,"wang"},*p;
p=a;
//printf("%i\n",p++->n); //5
//printf("%i\n",p->n++); //5
//printf("%i\n",(*p).n++); //5
printf("%i\n",++p->n); //6
->运算符优先级高于++;
struct List
{
int data;
struct List *next;
};
struct List a[3]={1,&a[1],2,&a[2],3,&a[0]},*p;
p=&a[1];
printf("%p,%p,%p\n",&a[0],&a[1],&a[2]);
//0xbfffda18,0xbfffda20,0xbfffda28
printf("%p\n",p); //0xbfffda20
printf("%d\n",--p->data); //1
printf("%p\n",p); //0xbfffda20
printf("%d\n",p->next->data); //3
printf("%p\n",p); //0xbfffda20
printf("%d\n",p--->data); //1
printf("%p",p); //0xbfffda18