问题 单项选择题

()的任务是将来源不同的编译单元装配成一个可执行程序。

A.编译程序

B.解释程序

C.链接程序

D.装入程序

答案

参考答案:C

解析:

本题考查程序语言基础知识。

编译程序、解释程序和链接程序都是实现程序语言翻译的语言处理程序。

解释程序也称为解释器,它或者直接解释执行源程序,或者将源程序翻译成某种中间表示形式后再加以执行;而编译程序(编译器)则首先将源程序翻译成目标语言程序,然后在计算机上运行目标程序。

这两种语言处理程序的根本区别是:

在编译方式下,机器上运行的是与源程序等价的目标程序,源程序和编译程序都不再参与目标程序的执行过程;

而在解释方式下,解释程序和源程序(或其某种等价表示)要参与到程序的运行过程中,运行程序的控制权在解释程序。解释器翻译源程序时不产生独立的目标程序,而编译器则需将源程序翻译成独立的目标程序。

汇编程序的功能是将汇编语言所编写的源程序翻译成机器指令程序。链接程序将分别在不同的目标文件中编译或汇编的代码收集到一个可直接执行的文件中。

填空题
阅读理解

My grandfather worked as a carpenter. On this particular day, he was building some crates(木箱)for the clothes his church was sending to an orphanage in Brazil. On his way home, he found his glasses were gone. When he mentally replayed his earlier actions, he realized what happened. The glasses had slipped out of his pocket and fallen into one of the crates. His new glasses were heading for Brazil!

The Great Depression was at its height, and Grandpa had six children. He had spent twenty dollars for those glasses that very morning.

“It’s not fair,” he thought as he walked home angrily. “I’ve been very faithful in giving my time and money to my work, and now this.”

Several months later, the director of the orphanage came to the United States. He wanted to visit all the churches that supported him, so he came to my grandfather’s small church in Chicago.

He began by thanking the people for their kindness in supporting the orphanage. “But most of all,” he said, “ I must thank you for the glasses you sent last year. You see, some people had just come to the orphanage, destroying everything, including my glasses. I was desperate. Even if I had the money, there was simply no way of replacing those glasses. Along with not being able to see well, I experienced headaches every day, so my coworkers and I were very worried about this. Then your crates arrived. When I removed the covers, I found a pair of glasses lying on top.”

He paused long enough to let his words sink in. Then, he continued: “When I tried on the glasses, it was as though they had been made just for me!” The people listened, happy for the miraculous glasses. But they thought it was strange because there were no glasses on their list of items to be sent overseas.

Sitting quietly in the back, with tears streaming down his face, my grandfather, an ordinary carpenter realized his glasses had found a good place to go.

小题1:The  underlined word “miraculous”(Paragraph 6)can be replaced by          .

A.practical

B.wonderful

C.necessary

D.important小题2: What would be the best title for the text?

A.The Perfect Mistake.

B.An Ordinary Carpenter.

C.A Careless Old Man.

D.A Pair of Glasses.