问题 单项选择题

若函数调用时的实参为变量时,以下关于函数形参和实参的叙述中正确的是( )。

A) 函数的实参和其对应的形参共占同一存储单元
B) 形参只是形式上的存在,不占用具体存储单元
C) 同名的实参和形参占同一存储单元
D) 函数的形参和实参分别占用不同的存储单元

答案

参考答案:D

解析: 本题考查的知识点是函数的形参和实参。
在定义函数时函数名后面括弧中的变量名称为“形式参数”(简称形参),在主调函数中调用一个函数时,函数名后面括弧中的参数(可以是一个表达式)称为“实际参数”(简称实参)。C语言规定,实参变量对形参变量的数据传递是“值传递”,即单向传递,只由实参传给形参,而不能由形参传回来给实参。在内存中,实参单元与形参单元是不同的单元。故本题应该选择D)。

阅读理解

阅读理解。

        In Canada you can find dogs, cats, horses etc. in almost every family. These are their pets. People love
these pets and regard them as their good friends. Before they keep them at their houses, they take them to
animal hospitals to give them needles so that they won't carry disease (疾病). They have special animal food
stores, though they can get animal food in almost every store. Some people spend around two hundred
Canadian dollars a month on animal food. When you visit people's homes, they would be very glad to show
you their pets and they are very proud of them. You will also find almost every family has a bird feeder in their
garden. All kinds of birds are welcomed to come and have a good meal. They are free to come and go and
nobody is allowed to kill any animals in Canada. They have a law against killing wild (野生的) animals. If you
killed an animal, you would be punished (处罚). If an animal happened to get run over by a car, people would
be very sad about it. 
        People in Canada have many reasons to like animals. One of them might be: Their family tie is not as
close as ours. When children grow up, they leave their parents and start their own career (生涯). Then the
seniors (老人) will feel lonely. But pets can solve this problem. They can be good friends and never leave
them alone.

1. This passage shows that Canadians _______.

[ ]

A. hate animals
B. often kill animals
C. love animals
D. don't keep their pets inside their houses
2. Children leave their parents when they grow up because _______.

[ ]

A. they don't love their parents any more
B. they can only find jobs far from their parents
C. their parents' houses are too small
D. it is not acceptable (能接受的) to live together with their parents when they grow up
3. They give their pets needles before keeping them at their houses because ________.

[ ]

A. the pets are sick
B. the pets are wild
C. they want to stop them from carrying disease
D. they want them to sleep on the way home
4. Which is right according to the passage?

[ ]

A. People buy animal food for their pets only at the animal food stores.
B. Pets eat better than people.
C. Almost every family has a bird cage at his house.
D. Any birds can come to the bird feeders to eat.
5. The passage mainly talks about ________.

[ ]

A. how to keep disease from pets
B. pets in Canada
C. how to take good care of pets
D. life of the seniors in Canada
单项选择题