问题 单项选择题

为了避免嵌套的if-else的二义性,C语言规定:else与______配对。

A.缩排位置相同的if

B.其之前最近的if

C.其之后最近的if

D.同一行上的if

答案

参考答案:B

解析:[评析] 在if语句中又包含—个或多个if语句称为if语句的嵌套。应当注意if与else的配对关系,在C语言中,从最内层开始,else总是与它上面最近的(未曾配对的)if配对。

完形填空

Canberra is the capital of Australia.It is a modern and lively city with a population of over 345.000.

History

Canberra is the eighth largest city in Australia.It is 238 km from Sydney and 507 km from Melbourne was once the capital of Austualia. Sydney people also wished to make their city the capital .It was difficult for the government to make the decision.Then in 1911,the government chose a place to build the new capital. It was between Sydney and Melbourne,the two largest cities .In 1927,the city was set up. It became the capital and was named Canberra.“Canberra”means“ a place for friends to get together.”

Cuture

Canberra is a beautiful city with trees and flowers everywhere.There’s a Flower Festival in September each year. People can enjoy all kinds of beautiful flowers and welcome the spring to arrive.A man-made like-lake. Bertey Griffin is in the center of the city.It’s about 25 km long. People like to ride bikes 、walk or run around the lake.In Canberra,there’re many famous universities like the Australian  National University and the University of Canberra.The National Library and the National Meseum of

Australia are also famous places that people like to visit.

小题1:How far is Canberra from Sydney?

A.25km

B.238km

C.345 km

D.507 km小题2:The word “Canberra”means__.

A.the largest city

B.a beautiful man—made lake

C.the old capital city

D.a place for friends to get together小题3:Canberra Flower Festival is a festival __.

A.ride lakes

B.visit Universities

C.welcome the spring

D.walk around the lake

单项选择题