问题 单项选择题

以下程序中sort( )函数的功能是对a所指数组中的数据进行由大到小的排序:  void sort(int a[ ],int n)   { int i,j,t;    for(i=0;i<n-1;i++)     for(j=i+1;j<n;j++)      if(a[i]<a[j]){t=a[i];a[i]=a[j];a[j]=t;}   }   main( )   { int aa[10]={1,2,3,4,5,6,7,8,9,10},i;   sort(&aa[3],5);   for(i=0;i<10;++)printf("%d,",aa[i] );   printf("\n");  }   程序运行后的输出结果是

A.1,2,3,4,5,6,7,8,9,10,

B.10,9,8,7,6,5,4,3,2,1,

C.1,2,3,8,7,6,5,4,9,10,

D.1,2,10,9,8,7,6,5,4,3,

答案

参考答案:C

解析:【解析】形参a接受的是字符串“4 5 6 7 8”,调用sort( )函数后,字符串的顺序变为“8 7 6 5 4 9 10”。

完形填空
完形填空。
     In l 901,the citizens of Colorado Springs in the USA decided to collect everydav items and to
     seal them in a steel box. The box was marked "To be    1    after midnight, December 31.AD  2000",
and was    2    in the Colorado College Library.
    One hundred years later, on the appointed day,300 people    3     to watch the opening of  the box?
Many in the    4    were the descendants of people who had placed thillgs    5    the    box.
    When the box was opened    6    midnight, the contents were in very good    7   . There    were
newspapers, photographs, diaries, name cards, family trees, books    8     dozens of letters,    including
one    9     by Theodore Roosevelt, who became the    10    of the USA later. One of Roosevelt's friends
lived in Colorado Springs at that time.
    Many of the letters were    11   to their descendants. They describe the   12   that people  of l 901 had
for the people of the next    13  . At that time, Colorado springs had j ustl a few thousand  14  . Now
nearly half a million people live there.
    Colorado College Library has scanned the materials and put them on a  15  .Cecil Muller,  whose
grandfather had   16  a collection of postcards in the box, said that the time capsule was a great   17  ."This
is a wonderful educational resource. We can learn so   18  about our history," he said."I never knew my
grandfather, but now I feel very   19   to him."
    In April, 2001,a committee filled the time capsule with    20    from modern Colorado Springs and
resealed it for another hundred years.
( )1. A. closed    
( )2. A. hidden    
( )3. A. gathered  
( )4. A. union    
( )5. A. outside  
( )6. A. before    
( )7. A. condition
( )8. A. so        
( )9. A. inveated  
( )10. A. Minister
( )11. A. addressed
( )12. A. feelings
( )13. A. decade  
( )14. A. travelers
( )15. A. website  
( )16. A. rescued  
( )17. A. diamond  
( )18. A. 1ittle  
( )19. A. close    
( )20. A. items    
B. opened      
B. forgotten  
B. dismissed  
B. league      
B. inside      
B. since      
B. mass        
B. but        
B. written    
B. Major      
B. suggested  
B. ideas      
B. century    
B. tourists    
B. recorder    
B. survived    
B. treasure    
B. many        
B. near        
B. diaries    
C. covered  
C. stored    
C. advanced  
C. group    
C. above    
C. after    
C. situation
C. or        
C. observed  
C. President
C. declared  
C. costoms  
C. year      
C. visitors  
C. mobile    
C. placed    
C. support  
C. few      
C. far      
C. letters  
D. discovered
D. packed    
D. arrived    
D. crowd      
D. under      
D. until      
D. copy      
D. and        
D. described  
D. Commander  
D. announced  
D. hopes      
D. date      
D. residents  
D. telegram'
D. stayed    
D. property  
D. much      
D. direct    
D. photos    
单项选择题