问题 单项选择题

若有定义int(*pt)[3];,则下列说法不正确的是( )。

A.int(*pt)[3]是一个数组指针

B.指针pt指向一个有3个整型变量的数组

C.定义了一个名为*pt、具有三个元素的整型数组

D.定义了一个名为pt的指针变量,它可以指向每行有三个整数元素的二维数组

答案

参考答案:D

解析: 首先,pt跟*结合,所以是一个指针,所指向的对象是含有3个元素的数组。所定义的指针没加const,所以是个指针变量,还可以指向类似对象的其他元素,也就是说还可以指向其他含有3个元素的数组。

填空题
阅读下面短文,根据短文内容用方框内所给词语的适当形式填空,使短文语义完整。
  sell    another    and   money    be    shout   for    if    work    thirst   
      A tourist was traveling alone in the desert (沙漠). After two weeks his car stopped 1.           , so he
started walking. He was lost and had no water. It was very hot and he became very 2.           . After five
hours he saw a small tent. There was a woman in it. The tourist said to her,"Water. Please 3.            me
some water."
     "I'm sorry. I haven't any water. I only sell ties (领带)," the woman replied.
     The tourist had to walk on, and became more thirsty. Two hours later he came to 4.            tent with
an old man in it.
     "Water. Please sell me some water."
     "I'm sorry. I haven't any water. I only sell ties," the old man replied. 
      The tourist put his 5.            back into his pocket and walked on. He was very, very thirsty and tired.
One hour later he arrived at a third tent. There 6.            a tall man in front of it. The tall man said, "Do
you want to buy a tie? I have a lot of beautiful ties."
     "No! No! No!" 7.            the tourist, "I need water. Please sell me water!"
     "I'm sorry. I only have ties," said the tall man. 
     The tourist fell to the ground 8.            started to crawl (爬). Half an hour later he saw a large,
expensive-looking hotel. He crawled to the door and took out all his money. He said to the doorman, "Water!
I will pay £100 9.            a glass of water." 
     The doorman looked at him and said, "I'm sorry, sir. You can't come into the hotel 10.            you are
not wearing a tie."
多项选择题