问题 填空题

下列程序执行后输出的结果是 【9】 。 f(int a) { static c=0; c=a+c++; return(c); } main() { int a=2,i,k; for(i=0;i<2;i++) k=f(a++); prinf("%d\n",k); }

答案

参考答案:G

解析:[评析] 在程序执行时,static变量仅初始化一次,下次使用时将使用上次保存的值。

单项选择题
完形填空
完形填空
     Although I had left school against the advice of my teachers, I had, without telling anyone, tried
to    1     my studies in literature at evening classes. It was a tiresome     2     from one end of the city to
another and to     3    among adults was uninteresting. I was the youngest in the     4   , so the friendship I
knew at school was     5     . I put up with it for a short period. It was    6    long a walk on cold winter's
nights and it was hard to put my    7    into Shakespeare with wet shoes and trousers. So I continued
writing poetry at home.
     By chance, I     8   some prizes and awards for literature. A young woman from a     9    company
came to the college one day. She told me that I won a national poetry award. I   10   at her in
astonishment (吃惊) and disbelief. She wanted to make a short    11    about me, to which I said, "No, I
couldn't do that." Not that I had any real    12   . I was just frightened. In the end she    13   me that I
should do it the following day.
     So I did. They made a short film of me reading one of my    14   and I became    15   interested in
literature than ever. I   16   what I should do after this, and decided some weeks later that I could not 
  17    myself spending the rest of my days dealing with machines. So one evening, I hesitatingly (犹豫地)
told my parents that I wanted to _ 18   to school. They were greatly surprised and a little afraid, but they
did not try to persuade me not to. They wanted to know if I was    19   , and if I knew what it meant
and    20   I realized that if I gave up my job training, it would be very difficult to get a good job. But
nothing could stop me, and they asked about the matter no further.
( )1. A. stop      
( )2. A. talk    
( )3. A. do        
( )4. A. family    
( )5. A. absent    
( )6. A. too      
( )7. A mind      
( )8. A. defeated  
( )9. A. TV        
( )10. A. looked  
( )11. A. talk    
( )12. A. reason  
( )13. A. advised
( )14. A. poems  
( )15. A. less    
( )16. A. wandered
( )17. A. think    
( )18. A. drop    
( )19. A. sure    
( )20. A. whether  
B. go on      
B. journey    
B. sit        
B. class    
B. missed    
B. very      
B. heart      
B. beat      
B. radio      
B. fixed      
B. film      
B. cause      
B. suggested  
B. stories    
B. much      
B. considered
B. consider  
B. leave      
B. clear      
B. that      
C. continue    
C. job        
C. talk        
C. city        
C. lost        
C. much        
C. soul        
C. won       
C. shoe        
C. shouted      
C. conversation
C. excuse      
C. agreed      
C. speeches    
C. far  
C. discussed
C. spend  
C. return      
C. curious  
C. how        
D. walk        
D. walk        
D. work        
D. country    
D. over        
D. quite      
D. thought    
D. hit        
D. food        
D. stared      
D. speech      
D. wish        
D. persuaded  
D. plans      
D. more        
D. wondered    
D. imagine    
D. go to      
D. true        
D. what