问题 单项选择题

若已定义的函数有返回值,则以下关于该函数调用的叙述中错误的是

A.函数调用可以作为独立的语句存在

B.函数调用可以无返回值

C.函数调用可以出现在表达式中

D.函数调用可以作为一个函数的形参

答案

参考答案:D

解析:【命题目的】本题综合考查函数的调用方式
【解题要点】函数的形参和实参具有以下特点:
①形参变量只有在被调用时才分配内存单元,在调用结束时,即刻释放所分的内存单元。因此,形参只有在函数内部有效。函数调用结束返回主调函数后则不能再使用该形参变量。②实参可以是常量、变量、表达式、函数等,无论实参是何种类型的量,在进行函数调用时,它们都必须具有确定的值,以便把这些值传送给形参。因此应通过预先用赋值,输入等办法使实参获得确定值。③实参和形参在数量上,类型上,顺序上应严格一致,否则会发生“类型不匹配”的错误。④函数调用中发生的数据传送是单向的。即只能把实参的值传送给形参,而不能把形参的值反向地传送给实参。因此在函数调用过程中,形参的值发生改变,而实参中的值不会变化。
【错解分析】函数调用不可以作为一个函数的形参。
【考点链接】函数可以嵌套调用,但是不可嵌套定义。

多项选择题
阅读理解

Nearly two thousand years have passed since a census decreed by Caesar Augustus become part of the greatest story ever told. Many things have changed in the intervening years. The hotel industry worries more about overbuilding than overcrowding, and if they had to meet an unexpected influx, few inns would have a manager to accommodate the weary guests. Now it is the census taker that does the traveling in the fond hope that a highly mobile population will stay long enough to get a good sampling. Methods of gathering, recording, and evaluating information have presumably been improved a great deal. And where then it was the modest purpose of Rome to obtain a simple head count as an adequate basis for levying taxes, now batteries of complicated statistical series furnished by governmental agencies and private organizations are eagerly scanned and interpreted by sages and seers to get a clue to future events. The Bible does not tell us how the Roman census takers made out, and as regards our more immediate concern, the reliability of present day economic forecasting, there are considerable differences of opinion. They were aired at the celebration of the 125th anniversary of the American Statistical Association. There was the thought that business forecasting might well be on its way from an art to a science, and some speakers talked about newfangled computers and high-falutin mathematical system in terms of excitement and endearment which we, at least in our younger years when these things mattered, would have associated more readily with the description of a fair maiden. But others pointed to the deplorable record of highly esteemed forecasts and forecasters with a batting average below that of the Mets, and the President-elect of the Association cautioned that “high powered statistical methods are usually in order where the facts are crude and inadequate, the exact contrary of what crude and inadequate statisticians assume.” We left his birthday party somewhere between hope and despair and with the conviction, not really newly acquired, that proper statistical methods applied to ascertainable facts have their merits in economic forecasting as long as neither forecaster nor public is deluded into mistaking the delineation of probabilities and trends for a prediction of certainties of mathematical exactitude.

小题1: Taxation in Roman days apparently was based on

[A]. wealth. [B]. mobility. [C]. population. [D]. census takers.

小题2:The American Statistical Association

[A]. is converting statistical study from an art to a science.

[B]. has an excellent record in business forecasting.

[C]. is neither hopeful nor pessimistic.

[D]. speaks with mathematical exactitude.

小题3: The message the author wishes the reader to get is

[A]. statisticians have not advanced since the days of the Roman.

[B]. statistics is not as yet a science.

[C]. statisticians love their machine.

[D].computer is hopeful.

小题4:The “greatest story ever told” referred to in the passage is the story of

[A]. Christmas. [B]. The Mets.

[C]. Moses. [D]. Roman Census Takers.