有以下程序 #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
![](https://lstatic.shangxueba.com/sxbcn/h5/images/tips_org.png)
A.3
B.5
C.7
D.11
第1题
ngargs[]){MyThreadt=newMyThread();MyThreads=newMyThread();t、start();S
ystem、out、print("one、");s、start();System、out、print("two、");}publicvoi
drun(){System、out、print("Thread");}}则下面正确的选项是()。
A.编译失败
B.程序运行结果为:one.Threadtwo.Thread
C.程序运行结果是:one.two.ThreaThread
D.程序运行结果不确定
第2题
A.100
B.200
C.程序错误
D.300
第3题
有以下程序:
# include< iostream>
执行这个程序,输出结果是()。
第7题
有以下程序: #include <iostream> #include <fstream> using namespace std; int main () { ofstream ofile; char ch; ofile.open ("abc.txt"); cin>>ch; while (ch!='#' ) { cin>>ch; ofile.put(ch);
A.程序编译时出错
B.abc#
C.abc
D.#
第9题
有以下程序
#include <stdio.h>
#include <string.h>
main()
{ printf("%d\n",strlen ("ATS\n012\1") ); }
程序运行后的输出结果是
A)3
B)8
C)4
D)9
第10题
A.10
B.20
C.0
D.出错
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!