单项选择题
有以下程序:
#include <string.h>
main( int argc,char*argv[])
int i=1,n=0;
while (i<argc) n=n+strlen(argv[i]); i++;
printf("%d\n",n);
该程序生成的可执行文件名为:proc.exe。若运行时输入命令行:
proc 123 45 67
则程序的输出结果是( )。
A.3
B.5
C.7
D.11
点击查看答案
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序: #include <stdio.h> main() char a[30],b[30]; scanf( %s ,a); gets(b); printf( %s n%s n ,a,b); 程序运行时若输入: how are you I am fine<回车> 则输出结果是( )。
A.how are you
I am fine
B.how
are you I am fine
C.how are you
I am fine
D.how are you
点击查看答案
单项选择题
以下函数的功能是:通过键盘输入数据,为数组中的所有元素赋值。 #include <stdio.h> #define N 10 void fun(int x[N]) int i=0; while(i<N)scanf( %d ,______); 在程序中下划线处应填入的是( )。
A.x+i
B.&x[i+1]
C.x+(i++)
D.&x[++i]
点击查看答案
相关试题
已知: struct st int n; struct st...
设fp已定义,执行语句fp=fopen( file ...
有以下程序: #include <stdio.h> v...