int *p1=&a,*p2=&b,*p3=&c; *p=*p1*(*p2); 输出c,这2行干什么?
#include <stdio.h> main() { int a = 1, b = 3, c = 5; int *p1 = &a, *p2 = &b, *p3 = &c, *p = &a;//没有定义*p *p = (*p1) * (*p2);//*p保存a*b的结果 printf("%d\n", c);//输出c }
#include <stdio.h> int main() { int a=1,b=3,c=5; int *p1 = &a,*p2 = &b,*p = &c;//*p1=a=1 *p2=b=3 *p=c=5 *p = *p1 * (*p2); // (计算前*p=c=5)(计算后*p=c=1*3) printf("%d\n",c); return 0; }