正在加载图片...
例2:观察下面程序的输出结果。「运行结果 main dint a=10, b=20 1)177724,177726 Int *kp *q 2)17724,17726 p=&a; q=&b printf(1)1%0,%0n”,&a,&b);|3)10,20 printf(“2)%,%n”,p,q); 4)10,20 printf(“3)%d,%dn”,a,b) &a=177724 printf(“4)%d,%d\n”,*p,*q) 177735T¨a或*p a &a &b=177726 10 17272-b或和 &b 20例2:观察下面程序的输出结果。 main() {int a=10,b=20; int *p ,*q; p=&a; q=&b; printf(“1)%o ,%o\n ”,&a,&b); printf(“2)%o ,%o\n ”,p,q); printf(“3)%d ,%d\n ”,a,b); printf(“4)%d ,%d\n ”,*p,*q); } 运行结果: 1) 177724 ,177726 2) 177724 ,177726 3) 10 , 20 4) 10, 20 10 20 a 或 *p b 或 *q &a=177724 &b=177726 177725 177727 &a &b 10 20 p q a b
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有