问题 单项选择题

有以下程序:
main ()
{
char k; int i;
for(i=1;i<3;i++)
{
scanf("%c",&k);
switch(k)
{
case ’0’: printf("another\n");
case ’1’: printf("number\n");
}
}
}
程序运行时,从键盘输入:01<回车>,程序执行后的输出结果是

A.another
number

B.another
number
another

C.another
number
number

D.number
number

答案

参考答案:C

解析: switch语句的执行过程是:在switch后面的表达式的值和case后面常量表达式的值吻合时,就执行后面的语句.如果在该语句的后面没有break语句,则继续执行下一个case,直到遇到break语句或switch多分支的结束,在 switch语句中,break语句的作用是使流程跳出switch结构,终止Switch语句的执行.本题中在for循环中嵌套了swish语句,每循环一次通过scanf()函数从键盘上输入一个k值,然后执行switch语句。for循环共循环了2次,当i=1时,从键盘上输入0,使得k的值为0,执行switch语句中case:0后面的语句,输出another,接着执行case:0下面的语句输出number,退出switch语句,当i=2时,从键盘上输入1,使得k的值为1,执行switch语句中case 1后面的语句,输出number,退出switch语句.当 i=3时退出循环.故最后的输出为another、number和number,所以,4个选项中选项C符合题意。

阅读理解

HARTLAND, Wis. (AP) — Lauren Panos was surprised when she walked into her ninth-grade English class in the fall and saw there were no boys.

Her parents had not told her they had enrolled her in a new all-girls class at Arrowhead High School in Hartland. Panos still isn't sold on the idea.

"All the girls there, they can talk out of turn," the 14-year-old said. "We are bored of tasks and it's really upsetting."

More public school systems are looking at separating boys and girls, whether for certain classes or by total schools, after the federal government opened the door last fall. Supporters say separating students by sex helps them learn better and allows boys and girls to explore subjects they may not otherwise take.

"Boys just make a bigger trouble in the class," Panos' classmate, Alyson Douglas, 15, said “I likes not worrying about boys causing disruptions.”

Presently, nationwide, at least 253 public schools offer single-sex classes and 51 schools are entirely single sex, according to the National Association for Single Sex Public Education. In1995, just three public schools offered single-sex classes.

Critics of same-sex classrooms argue that proven methods of improving education should be carried out instead of one that divides boys and girls.

"Too many schools feel they can carry out a social experiment with students' education with really the weakest of theories," said Emily Martin, deputy director of the American Civil Liberties Union's Women's Rights Project.

Single-sex schools are an "illusionary(错觉的) silver bullet," said Lisa Maatz, director of public policy and government relations for the American Association of University Women. They distract(分散) from real problems and do not offer proven solutions such as lower class sizes and enough funding, she said.

"I would suggest that for many of our kids and families, especially in Milwaukee, it's a question of choice," Spence said. "We have a series of choices in Milwaukee and I just think this should be one additional choice."

66.What surprised Lauren Panos was that_______ when she walked into the class.

A.her classmates were all boys.          B.her classmates were all girls.

C.the boys were all absent from class.     D.she went into the wrong class.

67.From what Panos said we can learn that ______.

A.Panos thinks that the idea is very good for they can talk freely.

B.Panos doesn’t accept the fact that girls in her class have to finish many tasks.

C.Panos doesn’t like the idea that boys and girls are in separate classes.

D.Panos prefers to study in a class in which there are only boys.

68.The underlined word “disruptions” in the fifth paragraph most probably means ______.

A.trouble         B.danger   C.interest        D.happiness

69.Critics don’t support the idea of single-sex schooling mainly because_______.

A.boys will cause more trouble and girls will hate studying.

B.single-sex schooling that is not a proven idea can leave out key problems

C.it doesn’t help students develop fully and healthily

D.it can excite students to explore the unknown

70.The passage is probably taken from_________.

A.a newspaper                   B.a magazine   

C.a book of education          D.A TV programme

问答题 简答题