【单选题】【消耗次数:1】
下面的方法,当输入为2的时候返回值是多少?( ) public int getValue(int i) { int result = 0; switch (i) { case 1: result = result + i; case 2: result = result + i * 2; case 3: result = result + i * 3; } return result; }
0
2
4
10
参考答案:
复制
纠错
相关题目
【单选题】 有以下程序,程序运行以后的输出结果是() #include stdio.h main( ) { int a[ ]={2,3,5,4},i; for(i=0;i switch(i%2) { case 0:switch(a[i]%2) {case 0:a[i]++;break; case 1:a[i]--; }break; case 1:a[i]=0; } for(i=0;i printf(\n); }
①  3 3 4 4
②  2 0 5 0
③  3 0 4 0
④  0 3 0 4
【多选题】 如果输入的是5,以下程序运行结果不正确的是() #include #define M n+n void main( ) { int n; int result; printf(请输入一个整数:); scanf(%d, result=M*M; printf(result = %d\n,result); }
①  100
②  35
③  25
④  50
【单选题】 The result is entirely() .
①  unpredictable
②  predictably
③  predict
④  prediction
【单选题】 以下程序段运行后s的值是()。 int a[3][3]={1, 2, 3, 4, 5, 1, 2, 3, 4} ; int i, j, s=1; for(i=0; i for(j=i+1; j s+=a[i][j];
①  6
②  120
③  7
④  240
【单选题】 The building suffered ____ damage as a result of the big fire.
①  moderate
②  considerable
③  considerate
④  concrete
【单选题】 As a result of the unfavorable working conditions, the project has to be put off ____ .
①  temporarily
②  tremendously
③  traditionally
④  typically
【单选题】 As a result of careless washing the jacket _____ to a child’s size.
①  compressed
②  shrank
③  dropped
④  decreased
【单选题】 下面程序执行后的结果是() #include stdio.h void fun( ) { int i,sum=0; int a[5]={1,2,3,4,5}; for (i=0;i { if (a[i]%2==0) { sum+=a[i]; } } printf(%d,sum); } void main( ) { fun( ); }
①  6
②  15
③  9
④  11
【单选题】 以下程序的输出结果是_______? 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
【单选题】 As a result of the unfavorable working conditions, the project has to be put off____.
①  temporarily
②  tremendously
③  traditionally
④  typically
随机题目
【单选题】 我国肾综合征出血热最主要的传染源是( )
①  家鼠
②  黑线姬鼠
③  棕背鼠
④  红背鼠
⑤  莫氏田鼠
【单选题】 肾综合征出血热最易侵犯的器官是( )
① 
② 
③ 
④ 
⑤  脑和脊髓
【单选题】 流行性出血热出现低血压休克是因为( )
①  血管通透性增加,血浆外渗,血容量下降
②  大出血
③  继发感染
④  水电解质紊乱
⑤  心力衰竭
【单选题】 肾综合征出血热的主要病理变化是( )
①  急性肾功能衰竭
②  低血容量性休克
③  血小板减少和功能障碍
④  全身弥散性血管内凝血及毛细血管中毒性损伤
⑤  全身性、广泛性小血管内皮细胞肿胀、变性及坏死
【单选题】 下列有关乙脑病毒的叙述不正确的是( )
①  属黄病毒科、黄病毒属
②  是双股正链DNA病毒
③  乙脑病毒抵抗力不强,对温度、乙醚和酸均敏感
④  乙脑病毒的抗原性较稳定
⑤  人对乙脑病毒普遍易感
【单选题】 乙脑极期的临床表现应除外( )
①  高热及全身中毒症状
②  惊厥、呼吸衰竭
③  意识障碍及高颅压
④  对称性瘫痪伴感觉丧失
⑤  脑膜刺激征及病理征反射
【单选题】 下列有关乙脑的描述不正确的是( )
①  乙脑是人畜共患的自然医源性疾病
②  猪不是乙脑的主要传染源
③  蚊子是乙脑的主要传播媒介
④  三带喙库蚊是乙脑的主要传播媒介
⑤  蚊子是乙脑的长期储存宿主
【单选题】 我国流行性乙型脑炎的流行季节是( )
①  1月~3月
②  3月~6月
③  11月~3月
④  3月~5月
⑤  7月~9月
【单选题】 传染性单核细胞增多症的传播途径不包括( )
①  口-口接触
②  输血
③  器官移植
④  骨髓移植
⑤  粪便
【单选题】 传染性单核细胞增多症的临床特点不包括( )
①  尿频
②  发热
③  咽峡炎
④  淋巴结肿大
⑤  肝脾肿大