问题 单项选择题

有以下程序:  #include<string.h>  main(int argc,char *argv[ ])  { int i,len=0;   for(i=1;i<argc;i++) len+=strlen(argv[i]);   printf("%d\n",len);  }  程序编译连接后生成的可执行文件是exl.exe,若运行时输入带参数的命令行是:  exl abcd efg 10<回车>  则运行的结果是( )。

A.22

B.17

C.12

D.9

答案

参考答案:D

解析:本题通过键盘赋值,使指针argv,分别指向字符串“abcd、O”,“efg\0”和“10\0”。

阅读理解

阅读理解。

Dear Sir,

      In reply to your advertisement in today's China Daily regarding a vacancy in your office, I wish to apply

for the position of senior clerk, which you have specified.

      I feel sure that I can meet your special requirements that the candidate must have a high command of

English, for I graduated from the English Language Department of Wuhan University three years ago.

     In addition to my study of English in the university, I have worked for three years as a secretary in the firm

of ABC Trading Co. Ltd.

     The main reason for changing my employment is to gain more experience with a superior trading company

like yours. I believe that my education and experience will prove useful for work in your office.

     I am enclosing my resume, certificate of graduation and a letter of recommendation from the president of

the university. I shall be obliged if you will give me a personal interview at your convenience.

                                                                                                                          Very truly yours,

                                                                                                                                 Li Mei

1. The author learned the news that the company wanted to employ staff members from _____.

A. a notice

B. a magazine

C. a poster

D. a newspaper

2. Why does the author want to change his job?

A. To be promoted.

B. To have a better job and higher pay.

C. To gain more working experience.

D. To make his living conditions improved

3. The author thinks _______ is (are) his advantage(s) to get the employment.

A. his good command of English

B. his working experience

C. his certificate and the letter of recommendation

D. both A and B

4. From the letter, we can learn that _________.

A. the author would be very thankful if the company arranged a meeting with him.

B. the firm of ABC Trading Co. Ltd had a vacancy in the office.

C. while the author was studying in the university, he worked part-time as a secretary.

D. the president of Wuhan University had good relations with the company.

单项选择题 A3/A4型题