问题 单项选择题

若有以下说明和定义union dt{int a;char b;double c;}data;以下叙述中错误的是______。

A.data 的每个成员起始地址都相同

B.变量 data 所占的内存字节数与成员 c 所占字节数相等

C.程序段 data.a=5;printf("%f\n",data.;输出结果为 5.000000

D.data 可以作为函数的实参

答案

参考答案:C

解析:union 是表示共用体的关键字,成员 a,b,c 共占用同一个内存空间, data 的每个成员起始地址都相 同;共用体变量所占的内存长度等于最长的成员的长度,故变量 data 所占的内存字节数与成员 c 所占字节 数相等;执行“data.a=5;printf("%f\n",data.c);” printf 函数只是将内存中的数据以不同的类型输出,而不能将 内存中的整型数据自动转换为等值的浮点数,故 C 是错误的。

填空题

Today, we’ll talk about what other effects watching TV might produce on children. Children should be (1) a lot of television, many experts and parents agree, but there is at least one circumstance when it might be beneficial: (2) . A recent study conducted by Italian researchers found that children (3) immediately preceding and during blood tests experienced less pain than children whose mothers (4) during the procedure, or children whose mothers were present but (5) .
The research, led by Carlo Brown, MD, at the University of Siena, is published in the Archives of Disease in Childhood. (6) the study. None received any type of anesthesia; the children and their mothers (7) . Both the group whose mothers attempted to distract them from the blood tests and those whose mothers simply observed reported (8) than the group who watched cartoons. For that group, the levels of pain were less and the children were better able to (9) .
One of the possible explanations is that children might have (10) during the procedures, exacerbating their perception of pain. "The higher pain level reported by children during (11) shows the difficulty mothers have in interacting positively (12) in their children’s life," the authors write.
However, they stressed that (13) still provided benefits, noting that the children would (14) during the procedures. "Indeed, children state that having their parent present (15) when in pain," say the authors.
Another possibility offered for consideration is the notion that the (16) might release pain-quelling endorphins. Endorphins, (17) produced by the pituitary gland, resemble opiates in their ability to produce analgesia and a sense of well-being. In other words, they might (18) .
In any case, the study results suggest that health workers should (19) to watch television during painful procedures (20) .

材料分析题