问题 填空题

下列程序的输出结果是 【10】
#include <iostream>
using namespace std;
int main()

int data=1;
int &r = data;
data+=5;
r+=5;
cout<<data<<end 1;
return 0;

答案

参考答案:K

解析: 本题考核引用的概念和使用。C++的引用是一种赋值、发送和返回复杂数据结构的方法,应用这种方法,系统不需要负担额外的开销,节省内存空间。在程序中对引用的存取都是对它所引用的变量的存取。题中r为data的引用,所以对r的操作等于对data的操作,所以最后data的值为11。

完形填空
完形填空
根据短文大意,从各题所给的选项中选择可以填入空白处的最佳选项。将其代号填入题前括号内。
  Life is not easy,so I’d like to say,"When anything happens, believe in yourself."
  When I was a young boy, I was too    1   to talk to anyone. My classmates
often laughed at me. I was sad but could do   2  . Later, something happened, and
it changed my life. It was an English speech(比赛) competition. My mother asked
me to take part in it. What a terrible idea! It meant I had to speak    3     all the
teachers and students of my school!  
  "Come on, boy. Believe in yourself. You are sure to    4  ." Then mother and
I talked about many different topics(话题). At last I    5   the topic "Believe in
yourself".I tried my best to remember all the speech and practiced it over 100
   6   . With my mother’s great love, I did    7    in the contest. I could hardly
believe my   8   when the news came that I had won the first place. I heard the
cheers from the teachers and students. Those classmates who once looked down
on me, now all said "Congratulations!"to me. My mother hugged (拥抱) me and
cried    9  .
  Since then, everything has    10   for me. When I do anything, I try to tell
myself to be sure and I will find myself. This is true not only for a person but
also for a country.
( )1. A. shy      
( )2. A. something
( )3. A. after    
( )4. A. win      
( )5. A. reached  
( )6. A. times    
( )7. A. quietly  
( )8. A. hands    
( )9. A. sadly    
( )10. A. changed  
B. sad    
B. nothing
B. with  
B. lose  
B. brought
B. words  
B. well  
B. arms  
B. warmly
B. asked  
C. excited  
C. anything
C. before  
C. beat    
C. chose    
C. sentences
C. slowly  
C. ears    
C. badly    
C. gone    
D. happy    
D. everything
D. among    
D. pass      
D. thought  
D. topics    
D. fast      
D. eyes      
D. excitedly
D. come