【单选题】【消耗次数:1】
#define X a+b main( ) { int a=3,b=4,s1; s1=2*X; printf(%d\n,s1); },以上程序的运行结果是( )?
8
14
10
6
参考答案:
复制
纠错
相关题目
【单选题】 有如下程序段: int a = b = 5; String s1 = 祝你今天考出好成绩!; String s2 = s1; 则表达式a == b与s2 == s1的结果分别是:( )。
①  true与true
②  false与true
③  true与false
④  false与false
【单选题】 以下程序的输出结果是_______? f(int b[],int m,int n) { int i,s=0; for(i=m;in;i=i+2) s=s+b[i]; return s; } int main() { int x,a[]={1,2,3,4,5,6,7,8,9}; x=f(a,3,7); printf(%d\n,x); }
①  7
②  8
③  9
④  10
【单选题】 应用程序的main方法中有以下语句,则输出的结果是 ( )。 String s1=new String(abc); String s2=new String(abc); boolean b1=s1.equals(s2); boolean b2=(s1==s2); System.out.print(b1+ +b2);
①  true false
②  false true
③  true true
④  false false
【单选题】 设s1=“”,则strlen(s1)的值是
①  0
②  1
③  2
④  3
【单选题】 若有变量说明:chars,s1[20];执行语句:s=student;s1=s;正确的叙述是:()。
①  二个语句都不正确
②  s所指向的字符串和s1的值都是student
③  第一个语句正确,而第二个语句不正确
④  第二个语句正确,而第一个语句不正确
【单选题】 若REPLACE(S,S1,S2)表示用字符串S2替换字符串S中的子串S1的操作,则对于S=“Beijing&Nanjing”,S1=“Beijing”,S2=“Shanghai”,REPLACE(S,S1,S2)=( )。
①  “Nanjing&Shanghai”
②  “Nanjing&Nanjing”
③  “ShanghaiNanjing”
④  “Shanghai&Nanjing”
【单选题】 有以下程序,程序执行后的输出结果是( ) #include int fun(int x [ ],int n) { static int sum=0,i; for(i=0; i{ sum+=x[i]; } return sum; } void main( ) { int a[ ]={1,2,3,4,5}; int b[ ]={6,7,8,9},s=0; s=fun(a,5)+fun(b,4); printf(%d\n,s); }
①  45
②  50
③  60
④  66
【单选题】 设有两个串S1和S2,则StrCompare(S1,S2)运算称做( )。
①  串连接
②  模式匹配
③  求子串
④  串比较
【单选题】 设有以下字符串定义,则数组s1和s2( )。char s1[]={ S ,t, r ,i,n, gchar s2[]= String
①  长度相同,但内容不同
②  长度相同,内容也相同
③  长度不同,但内容相同
④  长度不同,内容也不同
【单选题】 以下程序运行后的输出结果是( ) main() { int a=1,b=2; a=a+b; b=a-b; a=a-b; printf(%d,%d\n,a,B.; }
①  1,2
②  1,1
③  2,2
④  2,1
随机题目
【单选题】 Youdonthavetobeinsuchahurry,Iwouldratheryou________onbusinessfirst.
①  wouldgo
②  willgo
③  went
④  havegone
【单选题】 He____________ her out of her money.
①  chatted
②  changed
③  cheated
④  chose
【单选题】 Now it is illegal (非法的) to kill ______________ for their ivories.
①  tigers
②  lions
③  elephants
④  birds
【单选题】 Will you please____________ the experiment youve just made?
①  repeat
②  recover
③  renew
④  reform
【单选题】 It is necessary____________ the book immediately.
①  for him to return
②  that he return
③  his returning
④  to him return
【单选题】 Anger is a normal emotion that we all feel from time to time. Some people express anger openly in a calm reasonable way. Some explode with anger, and scream and shout. But other people keep their anger inside. They can not or will not express it. This is called repressing anger. Many doctors think that repressing anger is more dangerous to a person’s health than expressing it. They say that when a person is angry, the brain gives out the same hormones (荷尔蒙) as that are produced during tense and nervous situations. They speed the heart rate and raise blood pressure, so the person feels excited and ready to act. Repressing these feelings will only make the feelings continue, and this can lead to many medical problems. To prevent these problems, these doctors suggest letting the anger out by expressing it freely. But recently some other doctors question this. They say that people who express anger repeatedly and violently become, in fact, more but not less angry. And this could cause medical problems. However, some doctors say that both repressing and expressing anger can be dangerous. They believe that those who express anger strongly may be more likely to develop heart diseases, and that those who keep their anger inside may face a greater danger of high blood pressure. Doctors say the solution is to learn how to deal with anger. The first step is to admit that you are angry and to recognize the real cause of the anger, and then to decide if the cause is serious enough to get angry about. If it is, do not express your anger while angry. Wait until your anger has cooled down, and express yourself calmly and reasonably. Doctors also say that a good way to deal with anger is to find humor in the situation that has made you angry, for laughter is much healthier than anger.One correct way to deal with anger is to __________.
①  say nothing no matter how angry you are
②  express anger openly and freely right away
③  express your anger immediately but calmly
④  think about whether its worth getting angry
【单选题】 Anger is a normal emotion that we all feel from time to time. Some people express anger openly in a calm reasonable way. Some explode with anger, and scream and shout. But other people keep their anger inside. They can not or will not express it. This is called repressing anger. Many doctors think that repressing anger is more dangerous to a person’s health than expressing it. They say that when a person is angry, the brain gives out the same hormones (荷尔蒙) as that are produced during tense and nervous situations. They speed the heart rate and raise blood pressure, so the person feels excited and ready to act. Repressing these feelings will only make the feelings continue, and this can lead to many medical problems. To prevent these problems, these doctors suggest letting the anger out by expressing it freely. But recently some other doctors question this. They say that people who express anger repeatedly and violently become, in fact, more but not less angry. And this could cause medical problems. However, some doctors say that both repressing and expressing anger can be dangerous. They believe that those who express anger strongly may be more likely to develop heart diseases, and that those who keep their anger inside may face a greater danger of high blood pressure. Doctors say the solution is to learn how to deal with anger. The first step is to admit that you are angry and to recognize the real cause of the anger, and then to decide if the cause is serious enough to get angry about. If it is, do not express your anger while angry. Wait until your anger has cooled down, and express yourself calmly and reasonably. Doctors also say that a good way to deal with anger is to find humor in the situation that has made you angry, for laughter is much healthier than anger.Some doctors argue that people who often let the anger out would become __________.
①  stronger
②  more violent
③  angrier
④  more dangerous
【单选题】 They drew different ______________ from the facts.
①  attentions
②  examinations
③  decisions
④  conclusions
【判断题】 公司股东可以出资的方式有货币、土地使用权、劳务、信用、知识产权等方式。
①  正确
②  错误
【判断题】 有限责任公司的董事任期每届不得超过3年,连选可以连任。
①  正确
②  错误