问题 单项选择题

下列程序的运行结果是( )。
int y=5, x=14;
y=((x=3* y,x+1),x-1);
printf("x=%d,y=%d",x,y);

A.x=27,y=27

B.x=12,y=13

C.x=15,y=14

D.x=y=27

答案

参考答案:C

解析: 逗号表达式的求解步骤是先求解表达式1,然后依次求解表达式2,直到表达式N的值。整个逗号表达式的值就是最后一个表达式N的值。
表达式(x=3*y,x+1)中,第一个表达式x=3*y=3*5=15:第二个表达式x+1=16,但没有给x或y赋值,所以x还是等于15;第3个表达式x-1=15-1=14,所以y的值为14。

完形填空
完形填空。
     A woman came out of her house and saw three old men sitting in her front yard. She said, "I don't think
  1   you, but you must be hungry. Please   2   and have something to eat."
     "Is the man of the house   3  ?" they asked. "No," she replied, "He's out," "Then we cannot come in," they
replied. In the evening when her   4   came home, she told him what had happened. "Go and tell them I am
home and invite them in!" The woman went out and invited the men in."We do not go into a house   5  ," they
replied. "Why is that?" she asked.
     One of the old men explained:"His name is Wealth," he said pointing to one of his friends, "and he is Success,
and I am Love." Then he added, "Now go in and   6   your husband which one of us you want in your home."
     The woman went in and told her husband what was said. Her husband was   7  . "How nice!" he said. "Since
that is the case. Let us invite Wealth. Let him come and fill our home with wealth!" His wife   8  , "My dear, why
don't we invite Success?" Their daughter-in-law was listening from the other corner of the house. She jumped in
with her own   9  . "Wouldn't it be better to invite Love? Our home will then be filled with love." "Let us take our
daughter-in-law's advice," said the husband to his wife. "Go out and invite  10  to be our guest." The woman went
out and asked the three old men, "Which one of you is Love? Please come in and be our  11 ."
     Love got up and started walking towards the house.
     The other two also got up and  12  him.  13 , the lady asked Wealth and Success:"I only invited Love. Why
are you coming in?"
     The old men replied together:"If you had invited Wealth or Success, the other two of us would have stayed
out, but  14  you invited Love, wherever he goes, we go with him.  15  there is Love, there is also Wealth and
Success!"
( )1. A. like      
( )2. A. go out    
( )3. A. home      
( )4. A. friend    
( )5. A. one by one
( )6. A. argue with
( )7. A. overjoyed 
( )8. A. agreed    
( )9. A. suggestion
( )10. A. Success  
( )11. A. friend   
( )12. A. followed 
( )13. A. Pleased  
( )14. A. when     
( )15. A. Wherever      
B. know              
B. get away          
B. room               
B. father            
B. one after another 
B. discuss with       
B. surprised         
B. enjoyed            
B. plan              
B. Wealth             
B. relative          
B. stopped           
B. Surprised        
B. while             
B. However         
C. recognize      
C. get up        
C. family        
C. brother        
C. altogether   
C. fight with     
C. puzzled       
C. nodded        
C. solution    
 C. Love             
C. son-in-law  
C. honored        
C. Delighted    
C. if             
C. Whenever     
D. need           
D. come in       
D. office        
D. husband          
D. together    
D. quarrel with   
D. worried     
D. disagreed      
D. explanation 
D. them             
D. guest        
D. pleased         
D. Disappointed                
D. since        
D. Whatever      
单项选择题