下列程序舶输出结果是【 】。
include <stdio.h>
main()
{
int a[5]={2,4,6,8,10},*p;
p=a;p++;
printf("%d",*p);
}
第1题:
下面程序的输出结果是 ( ) # include<stdio.h> main( ) { int i,a[ ]={2,4,6,8}; int * p=a; for(i=0;i<4;i+ +)a[i]=* p+ +; printf(*%d\n",a[2]); }
A.6
B.8
C.4
D.2
第2题:
有下列程序main(){ int a[5]={2,4,6,8,10},*p,**k; p=a; k=&p; printf("%d",*(p++)); printf("%d\n",**k);}运行该程序,其输出结果是A.4 B.22C.24 D.46
第3题:
以下程序的输出结果是( )。 include<stdio.h> void swap(int*a,int*B){int*t; t=a;a=b;b=c;} main() {int i=3,j=5,*p=&i,*q=&j; swap(p,q);printf("%d %d\n",*p,*q); }
第4题:
有以下程序: #include <stdio.h> main( ) { char s[ ] ="159" , * p; p=s; printf( "% c", * p + + ); printf("%~", * p++);}程序运行后的输出结果是( )。
A.15
B.16
C.12
D.59
第5题:
下列程序的输出结果是( )。 #inelude <stdio.h> main() { int a[5]={2,4,6,8,10},*p,**k; p=a; k=&p; printf("%d",*(p++)); printf("%d\n",**k); }
A.4
B.22
C.24
D.46