问题 单项选择题

若有定义float a[15],*p=a;,且数组a的首地址为300H,则p+13所指向的数组元素的地址为 ( )

A.334H

B.30DH

C.352H

D.31AH

答案

参考答案:C

解析: 解答本题,首先要明白在对指针进行加、减运算的时候,数字“1”不是+进制的数“1”,而是指“1”个存储单元长度,而1个存储单元长度占多少存储空间,应该视具体情况而定。如果基本类型是int型,移动1个存储单元的长度就是位移2个字节,如果基本类型是float型,移动1个存储单元的长度就是位移4个字节。所以 p+13所指向的数组元素的地址为:300H+(13*4) H=352H。

完形填空
完形填空。
     Years ago, there was a very wealthy man who, with his devoted young son, shared a passion for
art collecting. Together, they traveled around the world, adding only the    1  art treasures to their
collection.
     One year, as winter approached,   2   engulfed (吞没) the nation, and the young man left to  3  
his country. After only a few short weeks, his father received a telegram. His beloved son was   4  
in action. The art collector  5   awaited more news,   6   he would never see his son again. Within
days, his fears were  7   . The young man had died while rushing a fellow soldier to a doctor.
     Upset and    8   , the old man faced the coming Christmas holidays with sadness. On Christmas
morning, a knock on the door awakened the   9   old man. As he opened the door, he was greeted
by a   10   with a large package in his hands.
     He introduced himself to the old man by saying," I was a   11   of your son. I was the one he was
 12  when he died. May I come in for a few moments? I have something to show you."
     As the two began to   13   , the soldier told of how the man's son had told everyone of his, not to
mention his father's   14  of fine art. "I am no   15  ," said the soldier, "but I want to give you this."
     As the old man unwrapped the package, he saw a portrait his son. Though the world would  16
consider it the work of a genius, the painting featured the young man's face   17   striking detail.
     Overcome with emotion, the man   18   the soldier. After the soldier had left, the old man put the
painting above the fireplace, pushing   19   thousands of dollars worth of art. His task completed, the
old man sat in his chair and spent Christmas gazing at the   20   he had been given.
( ) 1. A. latest
( ) 2. A. war
( ) 3. A. save
( ) 4. A. fighting
( ) 5. A. anxiously
( ) 6. A. wondering
( ) 7. A.comp1eted
( ) 8. A. lonely
( ) 9. A. sad
( )10. A. farmer
( )11. A. friend
( )12. A. rescuing
( )13. A. argue
( )14. A. description
( )15. A. reporter
( )16. A. sometimes
( )17. A. for
( )18. A. treated
( )19. A. own
( )20. A. treasure
B. richest
B. fire
B. serve
B. acting  
B. calmly
B. doubting
B. doubled
B. tired
B. puzzled
B. soldier
B. photographer
B. carrying
B. move  
B. love  
B. businessman
B. often
B. in  
B. questioned
B. aside
B. souvenir
C. cheapest
C. storm
C. help
C. missing
C. quietly
C. fearing
C. removed
C. nervous
C. angry
C. painter
C. partner
C. guarding
C. talk
C. sense
C. hero
C. never
C. of
C. welcomed
C. up
C. gift
D. finest          
D. flood            
D. build            
D. dying            
D. secretly        
D. expecting        
D. confirmed        
D. frightened      
D. worried          
D. seller          
D. guard            
D. hiding          
D. eat              
D. understanding    
D. artist          
D. still            
D. on              
D. thanked          
D. off              
D. package          
多项选择题