单项选择题
有以下程序:
int fun()
static int s=0;
s+=1:
return s:
main(int argc,char *argv[])
int n,i=0;
while(argv[1][i]!= '\0')
n=fun();i++;)
printf("%d\n",n*argc);
假设程序经编译、链接后生成可执行文件exam.exe,若键入以下命令:exam 123<回车>,则运行结果为( )。
A.6
B.8
C.3
D.4
点击查看答案
<上一题
目录
下一题>
热门
试题
单项选择题
以下函数的功能是:通过键盘输入数据,为数组中的所有元素赋值。 #define N 10 void main(int______) int i=0; while(i<N) scanf( %d ,x+(i++)); 在下划线处应填入的是( )。
A.*x
B.x[N]
C.x
D.&x
点击查看答案
单项选择题
若要定义一个具有5个元素的整型数组,以下定义语句错误的是( )。
A.int a[5]=0;
B.int b[]=0,0,0,0,0;
C.int c[2+3];
D.int i=5,d[i];
点击查看答案
相关试题
有以下程序: #include <stdio.h> v...
有以下程序: #include <stdio.h> m...
有以下程序: #include <stdio.h> m...
有以下程序: #include <stdio.h> s...
以下程序的输出结果是( )。 main() ...