问题 单项选择题

已定义以下函数:
int fun(int *p)
return *p;
fun函数返回值是( )。

A) 不确定的值
B) 一个整数
C) 形参p中存放的值D) 形参p的地址值

答案

参考答案:B

解析: 本题考查的是指针的概念。在C语言中,指针是一种特殊的变量,它存放的值是一个内存地址。所以一个指针变量涉及三个值:指针变量所指内容的值、指针变量中存放的值、指针变量的地址值。它们可以分别用表达式*p、p、&p来表示。题目中fun()函数的返回表达式是*p,所以选项C)、D)不为所选,而应该是形参p所指内容的值,因为p为int型指针,所以该值是一个整数。故应该选择B)。

阅读理解
阅读理解。
     NEW YOURK MUSEUM  
     The largest ~specializing (专业研究) in
American history.
Open: Mon. to Fri.: 9: 00a.m.- 5: 00p.m.
Sat. : 9:00a.m. - 1:00 p.m.  
Address: 1100 Chesnut St. New York  
Telephone: 77364431
     THE CITY FLWER SHOW  8
       APRIL TO 17 APRIL  
Price: ¥50 for adults (成年人) ¥25 for children  
Address: 112 Kendal Way  Chesterton 
               Cambridge CB4 1LT 
Telephone : 55539561

       ENGLISH SUMMER CAMP (英语夏令营)
     How will you spend your summer? English
Summer Camp 2006 at  University of Toronto,
Canada!
Ages: 13 to 18
For More Information, Call CEE / CCIEE at
     (010) 6606-2607

      POP MUSIC WEEK  
     Bands from home and abroad will give
performances in Chaoyang Park, Beijing. 
Chinese singers like Zhang Liangying will also
share(分享)music with fans .  
Price: 30-50 yuan  
Time: 9: 00 a.m. - 9: 00 p.m.
1. New York Museum is closed on ______. 
A. Monday       
B. Friday       
C. Saturday       
D. Sunday 
2. Tommy is an 8-year-old boy. He wants to visit The City Flower Show with his  parents. 
     How much will they pay?  
A. 75 yuan    
B. 100 yuan  
C. 125 yuan     
D. 150 yuan
3. If you want to get more information about English Summer Camp, you can ______. 
A. go to Canada            
B. write to CEE/CCIEE 
C. call at (010) 6606-2607    
D. send an e-mail to University of Toronto 
4. ______ will give Performances in Pop Music Week in Chaoyang Park . 
A. Bands        
B. Dancers     
C. Singers     
D. Both A and C
5. Phillip, twenty years old , is not allowed to ______. 
A.THE CITY FLOWER SHOW       
B. ENGLISH SUMMER CAMP 
C. NEW YORK MUSEUM           
D. POP MUSIC WEEK 
选择题