【简答题】【消耗次数:1】
int a[10]={0,1,2,3,4,5,6,7,8,9};int *p;int i;p=a;printf(%d\n,*p++);printf(%d\n,*++p);程序输出结果为[填空1]和[填空2]。
参考答案:
复制
纠错
相关题目
【简答题】 #includestdio.hint main(){int a[10]={0,1,2,3,4,5,6,7,8,9};int *p;p=a;printf(%d\n,*p);p++;printf(%d\n,*p);}程序输出结果为[填空1]和[填空2]。
【单选题】 下述程序的运行结果( )。 #includevoid main() { int p,a=0; if(p=a!=0)printf(%d\n else printf(%d\n,p+2); }
①  1
②  2
③  3
④  5
【单选题】 以下程序运行的输出结果是。main(){ int p=30;printf(%d\n,(p/320?p/10:p%3)); }
①  0
②  1
③  2
④  3
【简答题】 #include stdio.hint main(){void swap(int *p1,int *p2);int a,b;int*pointer_1,*pointer_2;printf(please enter a and b:scanf(%d,%d,a,pointer_1=pointer_2=if(ab) swap(pointer_1,pointer_2);printf(%d,%d\n,a,b);return 0;} void swap(int *p1,int *p2){int temp;temp=*p1;*p1=*p2;*p2=temp;}若输入5,9,则输出为[填空1]。
【简答题】 #include stdio.hint main(){void swap(int *p1,int *p2);int a,b;int*pointer_1,*pointer_2;printf(please enter a and b:scanf(%d,%d,a,pointer_1=pointer_2=if(ab) swap(pointer_1,pointer_2);printf(%d,%d\n,a,b);return 0;} void swap(int *p1,int *p2){int * temp;temp=p1;p1=p2;p2=temp;}若输入5,9,则输出为[填空1]。
【单选题】 以下程序的运行结果是()。main(){inta[3]={1,2,3};int*num[3];int**p,i;for(i=0;ii++)num[i]=p=num;printf("%d",**p);}
①  1
②  3
③  a[0]
④  num
【单选题】 以下程序的输出结果是_______? f(int b[],int m,int n) { int i,s=0; for(i=m;in;i=i+2) s=s+b[i]; return s; } int main() { int x,a[]={1,2,3,4,5,6,7,8,9}; x=f(a,3,7); printf(%d\n,x); }
①  7
②  8
③  9
④  10
【简答题】 查找n在数组a中最后一次出现的位置(数组首元素的位置为零)。 例如:如果a数组中的元素为:1,5,2,5,6,8,7,4,3,0, 当n=5时,程序的输出结果为:5 is No.3 。 当n=10时,程序的输出结果应为:10 not found !。 #includevoid main( ) { int a[10]={1,5,2,5,6,8,7,4,3,0}; int i,k,n,f=0; scanf(%d, for(i=0;ii++) /************found************/ if([填空1]) { f=1; /************found************/[填空2] } if(f) printf(%d is No. %d\n, n,k); else printf( %d not found !\n }
【单选题】 有以下程序,执行后输出结果是() main( ) { int m[][3]={1,4,7,2,5,8,3,6,9}; int i,j,k=2; for(i=0;i { printf(%d ,m[k][i]); } }
①  4 5 6
②  2 5 8
③  3 6 9
④  7 8 9
【单选题】 已知int a[10]={0,1,2,3,4,5,6,7,8,9},*p=a;不能表示数组a中元素的式子是()
①  *a
②  *p
③  a
④  a[p-a]
随机题目
【单选题】 1931年前后中国共产党制定的土地革命路线中,对富农的政策是?
①  消灭富农
②  联合富农
③  限制富农
④  保护富农
【单选题】 为了克服根据地严重困难的局面,毛泽东发出的号召是?
①  开垦荒地,兴修水利
②  发展生产,保障供给
③  自己动手,丰衣足食
④  耕一余三
【单选题】 1941年1月,国民党发动第二次反共高潮,在皖南以8万余兵力包围袭击新四军军部及所属部队9千多人,蒋介石还诬称新四军“叛变”,宣布取消新四军番号。这就是国民党制造的?
①  华北事变
②  皖南事变
③  北京事变
④  七七事变
【单选题】 结束陈独秀右倾机会主义错误的会议是?
①  八七会议
②  中共六大
③  文家市会议
④  古田会议
【单选题】 俄国十月社会主义革命爆发的时间是?
①  1916年10月25日
②  1917年11月7日
③  1918年12月8日
④  1919年5月4日
【单选题】 日本开始发动全面侵华战争的起点是?
①  二二八事变
②  七七事变
③  八一三事变
④  华北事变
【单选题】 在抗日战争时期,中国共产党在根据地实行的土地政策是?
①  没收地主土地
②  减租减息
③  耕者有其田
④  地主不分田
【单选题】 《新青年》的创办者是?
①  陈独秀
②  胡适
③  李大钊
④  鲁迅
【判断题】 五四运动以前,社会主义思潮在中国蓬勃兴起,马克思主义开始在知识界中得到传播。
①  正确
②  错误
【判断题】 瞿秋白在八七会议上着重阐述了党必须依靠农民和掌握枪杆子的思想,强调党“以后要非常注意军事,须知政权是由枪杆子中取得的”。
①  正确
②  错误