问题 单项选择题

有以下程序段
int j; float y; char name[50];
scanf("%2d%f%s",&j,&y,name);
当执行上述程序段,从键盘上输入55566 777abc后,y的值为______。

A.55566.0

B.566.0

C.7777.0

D.566777.0

答案

参考答案:B

解析: 本题考查的重点是scanf函数的用法。程序中第一个格式化字符串“%2d”表示读入一个两位的整数,因此就将键盘输入的前两位数赋到第一个变量j中,即j的值为55;后一个格式化字符串为“%f”,再将后续读入的数字赋给浮点变量y,因此y的值为566.0,即到读到空格时结束。

阅读理解

The baby is just one day old and has not yet left hospital. She is quiet but alert (警觉). Twenty centimeters from her face researchers have placed a white card with two black spots on it. She stares at it carefully. A researcher removes the card and replaces it by another, this time with the spots differently spaced. As the cards change from one to the other, her gaze(凝视) starts to lose its focus - until a third, with three black spots, is presented. Her gaze returns; she looks at it for twice as long as she did at the previous card. Can she tell that the number two is different from three, just 24 hours after coming into the world?

Or do newborns simply prefer more to fewer? The same experiment, but with three spots shown before two, shows the same return of interest when the number of spots changes. Perhaps it is just the newness? When slightly older babies were shown cards with pictures of objects(a comb, a key, an orange and so on), changing the number of objects had an effect separate from changing the objects themselves. Could it be the pattern that two things make, as opposed to three? No again. Babies paid more attention to squares moving randomly on a screen when their number changed from two to three, or three to two. The effect even crosses between senses. Babies who were repeatedly shown two spots became more excited when they then heard three drumbeats than when they heard just two; likewise(同样地) when the researchers started with drumbeats and moved to spots.

小题1:The experiment described in Paragraph 1 is related to the baby’s ______.

A.sense of hearing.

B.sense of sight.

C.sense of touch.

D.sense of smell.小题2:Babies are sensitive to the change in ______.

A.the size of cards.

B.the colour of pictures.

C.the shape of patterns.

D.the number of objects.小题3:Why did the researchers test the babies with drumbeats?

A.To reduce the difficulty of the experiment.

B.To see how babies recognize sounds.

C.To carry their experiment further.

D.To keep the babies’ interest.小题4:Where does this text probably come from?

A.Science fiction.

B.Children’s literature.

C.An advertisement.

D.A science report.

单项选择题