单项选择题
有以下程序:
main(int argc, char *argv[])
int n=0,i;
for (i=1; i<argc; i++) n=n*10+*argv[i]-'0';
printf("%d\n",n);
编译连接后生成可执行文件tt.exe。若运行时输入以下命令行
tt 12 345 678
程序运行后的输出结果是( )。
A.12
B.12345
C.12345678
D.136
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序: main() int k=4,n=0; for(;n<k;) n++; if(n%!=0)continue; k--; printf( %d n ,k,n); 程序运行后的输出结果是( )。
A.1,1
B.2,2
C.3,3
D.4,4
点击查看答案&解析
单项选择题
有以下程序: #include <string.h> main() char p[20]='a','b','c','d',q[]= abc ,r[]= abcde ; strcat(p,r); strcpy(p+strlen(q),q); printf( %d n ,strlen(p)); 程序运行后的输出结果是( )。
A.9
B.6
C.11
D.7
点击查看答案&解析
相关试题
有以下程序: main() int a=15,b...
有以下程序: #include <stdio.h> ...
有以下程序: #include <stdio.h> m...
有以下程序: int fun(int x[],int...
有以下程序: main() char s[]= Y...