试题与答案

在C++语言程序中,对象之间的相互通信通过( )。A. a==1; B. ++i

题型:单项选择题

题目:

在C++语言程序中,对象之间的相互通信通过( )。

A. a==1;

B. ++i;

C. a=a+1=5

D. ! (++a! =b--)

答案:

参考答案:B

解析:赋值表达式的组成是:在赋值运算符的左边是一变量,右边是一表达式。选项B) =8+b+c=9中,前半句a=8+b+c正确,但的是a+b+c=9左边其实是一个表达式,而不是一个变量。选项C) i=l2.3*%4中,连用两个双目运算符,双目运算符的用法是左右两端必须都是表达式或变量才行。选项D) a=a+7=c+b,a+7=c+b的左边也是―个表达式,而非变量。

试题推荐
题型:填空题

根据短文内容及首字母提示, 填写所缺的单词。

     There was a big earthquake under the India Ocean Area o  1  December 26th 2004 and it c  2   a

large tsunami. Tsunamis are great sea waves produced especially by an earthquake.

     That morning my classmates and I went to the seaside and had breakfast when we h  3  a loud noise

like bombs. People in the sea ran w   4   to the bank and s   5   , 'Water is coming!' Someone told us to

run to a higher place. We ran as q  6   as we could.

     Since we did not know what happened,  we  were very f   7    . We looked back  and  saw  a t   8    

picture. The water waves were so strong that cars  were made to fall upside down and the flood w  9  

away everything on the seaside .

     We were safe but the n   10   of victims was over 140,000. People call the day 'Black Sunday'.

查看答案
微信公众账号搜索答案