问题 填空题

以下函数rotate的功能是:将a所指N行N列的二维数组中的最后一行放到b所指二维数组的第0列中,把a所指二维数组中的第0行放到b所指二维数组的最后一列中,b所指二维数组中的其他数据不变。 #defineN 4 void rotate(int a[][N],int b[][N] {int i,j; for(i=0;i<N;i++) {b[i][N-1]=【 】;【 】=a[N-1][i];} }

答案

参考答案:a[0][i],b[i][0]

解析:根据题意,语句"b[i][N-1]=【 】;"的作用是把a所指二维数组中的第0行放到b所指二维数组的最后一列中,在a数组中,第0行用a[0][]来表示,所以第19空填对a[0][i];语句"【 】=a[N-1][i];"的作用是将a所指二维数组中的最后一行放到b所指二维数组的第0列中,b数组中第0列用b[][0]来表示,所以,第20空填b[i][0]。

阅读理解

Some children are flying kites near the river. They are very high and Peter can see them from the classroom. After lunch his aunt comes to see his mother and brings a kite to him. It looks like a bird. He wants to fly it but his mother doesn’t let him do that.

“It’s time to go to school,” says his mother, “You can fly it after dinner.”

The boy is unhappy, and says goodbye to his aunt and leaves. Now he is in the classroom but he doesn’t listen to Miss Black. He only thinks how to fly the kite. Miss Black writes something on the blackboard and then turns to the class.

“Name nine things with milk in them, Peter.” she says.

The boy doesn’t hear her and still sits there. A boy in Row 4 beats(敲打)his back and he knows it. He stands up and Miss Black asks him the question again. He thinks for some time and then says, “Yes, madam, tea, coffee, cake and …er…six cows(奶牛).”

小题1:There is _____ near Peter’s school.

A.a bank

B.a river

C.a lake

D.a park小题2:In the classroom, Peter can see ______.

A.some children swimming in the park

B.his aunt buy a kite for him

C.some students reading beside the lake

D.some children flying kites near the river小题3: _____ comes to visit his mother after lunch.

A.Peter’s teacher

B.Peter’s friend

C.Peter’s cousin

D.Peter’s aunt小题4: Peter’s mother tells him to fly the kite ________.

A.at breakfast

B.in the classroom

C.after dinner

D.in school小题5: In class, Peter only thinks ______.

A.his teacher’s words

B.what the kite looks like

C.how to fly the kite

D.how to answer the teacher’s question

单项选择题