1、内容000341地址FF00FF01FF02 2FF03idaddressnFF00chFF02(1)实际存储(2)符号表 内容0003FF00地址FF00FF01FF02 2FF03idaddressnFF00pFF02(1)实际存储(2)符号表#include void main()int a,b,sum;printf(请输入a,b的值:);scanf(%d,%d,&a,&b);sum=a+b;printf(sum=%dn,sum);#include void main()int a,b,sum=0;int*p_1,*p_2;printf(请输入a,b的值);scanf(%d,%d,&a,
2、&b);p_1=&a;p_2=&b;sum=*p_1+*p_2;printf(sum=%dn,sum);练习:输入下面的程序,观察运行结果,并进行分析。例8.4 使用指针变量求解:输入2个整数,按升序(从小到大排序)输出。程序运行结果:Input the first number:8Input the second number:3a=8,b=3min=3,max=8 指针的方法#include void main()int a5=10,20,30,40,50;int*p;for(p=a;pa+5;p+)printf(%dn,*p);数组的方法#include void main()int a5=10,20,30,40,50;int i;for(i=0;i5;i+)printf(%dn,i,ai);p3FF06FF08p3FF02FF04p3FF00FF02a123FF00