问题 填空题

调试方法中的 【3】 最适合小规模程序的排错。

答案

参考答案:回溯法

解析: 这种调试方法是从出现错误征兆处开始,人工沿控制流程往回追踪,直至发现出错的根源。这是在小程序中常用的一种有效的调试方法。程序变大后,可能的回溯路线显著增加,以致人工进行完全回溯到望而不可及。例如,程序中发现错误处是某个打印语句,通过输出值可推断程序在这一点上变量的值,再从这一点出发,回溯程序的执行过程,反复考虑:“如果程序在这一点上的状态(变量的值)是这样,那么程序在上一点的状态一定是这样...”,直到找到错误的位置。

阅读理解

When in 1789,George Washington became the first president of the United States,there was no permanent(永久的)capital in which to house the government.During the Revolutionary War seven different cities had served as the national capital.In addition,members of congress(国会)could not agree as to where this permanent capital should be located.Some officials wanted it in the north,others wanted it in the south.Each of the states hoped that the capital might lie within its own state lines.At last it was decided that the capital should occupy a section(区域)by itself,separate from any of the states.The place chosen was situated on the Potomas River.The land belonged originally(原先地) to the state of Maryland,but Maryland agreed to the national government.The section was named the District of Columbia after Christopher Columbus.The city itself was named Washington,after George Washington.Work was begun on the new capital in 1791.In the year 1799 Congress occupied the new capital building at the same time the White House was opened as the home of all future presidents.

小题1:Before the year 1800,the capital of America had been located in_________.

A.Maryland

B.Washington

C.New York

D.several cities小题2:Why was it decided that the capital should be separated from any of the states?Because_________.

A.the District of Columbia was on the borders(边境) of several states

B.the District of Columbia was in the center of America

C.Maryland insisted that the capital lie in its own state

D.each of the states wanted the capital might lie within its own state小题3:Presidents of the United States live in_________.

A.the capital building           C.Maryland           C.New York           D.the White House

小题4:Which of the following statements is true?

A.Capital is the place for presidents to live in.

B.Capital should be the largest city in the country.

C.It took nine years to build the capital of Washington.

D.Since 1791,Washington has been the capital of the United States.

单项选择题