问题 单项选择题

若要用下面的程序片段使指针变量P指向一个存储整型变量的动态存储单元
int *p;
p=______malloc(sizeof(int));
则应填入______。

A) int
B) int*
C) (*int)
D) (int*)

答案

参考答案:D

解析:[评析] 不论p是指向什么类型的指针变量,都可以通过强制类型转换的方法使之类型一致,强制类型转换的格式为(数据类型*)。

单项选择题
阅读理解

阅读理解

     The storage of classified research at all 24 labs run by the US Department of Energy was shut down

this week after officials decided that the security problems recently found at the Los Alamos National

Laboratory in New Mexico might also exist elsewhere.

     Several computer disks went missing at Los Alamos earlier this month, forcing Energy Secretary

Spencer Ahraham to stop all work at the lab until the problems are found out. As of 26 July, two missing

disks had still not been found, and 15 employees had been suspended in connection with the

disappearance.

      Now all energy labs will stop doing classified research that involves (需要) removable storage

devices-such as computer disks-until all the devices are given explanation for and new procedures are

in place for monitoring their handling by laboratory employees.

      "While we have no evidence that the problems being investigated are present elsewhere . we  have

a responsibility to take all necessary action to prevent such problems,"Abraham said on 23 July.

     The shut-down isn't quite as dramatic (惊人的) as it sounds,expert say. Only two labs will be

seriously affected;Sandia National  Laboratory  in  Albuquerque, New  Mexico , and Lawrence

Livemore National Laboratory in Califomia. Together with Los Alamos,these two labs conduct the most

part of the country's nuclear weapon programmes. At Livermore, 876 employees will be suspended

during the storage of some 12,000 items of classified removable material.

      At other labs , far fewer people will  be affected. " The impact (影响) should be the smallest , "

says  Martha  Krebs , former director of the energy department's science office.

1. Why was the storage of classified research at all 24 labs shut down?

A. Because the security problems might be present elsewhere .

B. Because the security problems existed elsewhere.

C. Because two missing computer disks had still not be found.

D. Because officials decided to stop doing such research.

2. How many labs conduct the country's nuclear weapon programmes according to the text?

A. About 24.                  

B. Only 2.

C. More than 2.              

D. Over 15.

3. The underlined word "suspended" in the second paragraph probably means" _________". 

A. hung from above

B. stopped from holding a position

C. doubted

D. fired

4. It can be inferred from the text that________.  

A. the computer disks must have been stolen by terrorists

B. the people living in the United States have little security

C. the United States is a country whose security is very bad

D. the missing of the computer disks caused great fear among Americans