问题 填空题

若下列程序运行时输出结果为
1,A,10.1
2,B,3.5
请将程序补充完整。
#include<iostream>
using namespace std;
void test(int a,char b,double c)

cout<<a<<’,’<<b<<’,’<<c<<end1;

int main()

void test(int,char,double ______);
test(1,’A’,10. 1);
test(2,’B’);
return 0;

答案

参考答案:=3.5

解析: 本题考查了函数默认参数的应用。本题中第一次调用test函数数值1,A,10.1;第二次调用少了一个实参,却要求输出2,B,3.5,由此分析,应将test函数的第三个参数声明为默认参数。且默认为3.5,才能达到要求的输出结果。故应填入=3.5或者c=3.5。

填空题
完形填空
完形填空。
      I sat down to read under an old tree in the park. I felt my life was _  1__, for my whole world was
dark. 
      A young boy ran up to me, out of _    2___. He stopped right before me and said __  3___, “ Look
what I found!” In his hand was a flower, and what a poor sight! The flower was dry and _    4___. I gave
him a small smile and then turned my eyes away so that he could take his dry flower and go off to play.
           5___, he sat next to my side and placed the flower to his        6____ and said in surprise, “ It smells sweet and it’s beautiful, too. That’s _     7____ I picked it. Here, it’s for you.” The flower before me was
dead. But I knew I must __   8___ it, or he might never leave. So I accepted the flower, and replied, “ This
is just what I _    9___.” Just then, for the first time I noticed that the boy could not     _10____--- he was
blind.
       Tears came down from my face as I _     11____ him for picking the best one. “ You are welcome,” he smiled, and then ran off to _    12____. I sat there and wondered how he knew about my pain.
      Though the eyes of a blind child, _    13_ _ I could see the problem was not with the world; the problem was me. And for all those years I myself had been _   14_ _. I decided to see the beauty in life, and    15  _every second. And then I held that dry flower up to my nose and breathed in the smell of a beautiful rose.
( )1.  A. hopeless    
( )2.  A. mind        
( )3.  A. sadly      
( )4.  A. dead        
( )5.  A. So          
( )6.  A. head        
( )7.  A. how        
( )8.  A. buy        
( )9.  A. admire      
( )10.  A. cry        
( )11.  A. forgave    
( )12.  A. sleep      
( )13.  A. at most    
( )14.  A . cheerful  
( )15.  A. waste      
B. colourful
B. trouble  
B. strictly  
B. fresh    
B. Or        
B. nose      
B. when      
B. sell      
B. dislike  
B. speak    
B. thanked  
B. study    
B. at times  
B. useful    
B. enjoy    
C. simple  
C. breath  
C. angrily
C. alive  
C. However
C ear      
C. where  
C. accept  
C. need    
C. smile  
C. paid    
C. dance  
C. at first
C. blind  
C. lose    
D. wonderful
D. work      
D. excitedly
D. heavy    
D. And      
D. neck      
D. why      
D. break    
D. have      
D. see      
D. hated    
D. play      
D. at last  
D. deaf      
D. forget