#include <stdio.h>
int main(void)
{
int x, *p, t;
x = 55;
p = &x;
printf("%d %d\n", x, *p);
*p = 65;
printf("%d %d\n", x, *p);
t = 85;
printf("%d %d", x, t);
return 0;
}
运行结果
55 55
65 65
65 85
#include <stdio.h>
int main(void)
{
int x, *p, t;
x = 55;
p = &x;
printf("%d %d\n", x, *p);
*p = 65;
printf("%d %d\n", x, *p);
t = 85;
printf("%d %d", x, t);
return 0;
}
运行结果
55 55
65 65
65 85