单项选择题
有以下程序: #include <stdio.h> int a=2; int f(int *a) { return (*a) ++;} main() { int s=0; { int a=5; s+=f(&a); } s+=f(&a); printf("%d\n",s) } 执行后的输出结果是( )。
A.10
B.9
C.7
D.8
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序: #include <stdio.h> main() { int i,n=0; for(i=2;i<5;i++) { do { if(i%3) continue; n++; } while(! i); n++; } printf( n=%d n ,n); } 程序执行后的输出结果是( )。
A.n=5
B.n=2
C.n=3
D.n=4
点击查看答案&解析
单项选择题
设有定义:int n=0,*p=&n,**q=&p;则以下选项中,正确的赋值语句是( )。
A.P=1
B.*q=2;
C.q=p;
D.*p=5;
点击查看答案&解析
相关试题
下面程序的功能是输出以下形式的金字塔图案...
有以下程序: #include <stdio.h> s...
B
有以下程序: #include <stdio.h> s...
有以下程序: #include <stdio.h> m...