【单选题】【消耗次数: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
随机题目
【单选题】 ( )属于固定资产,单位价值高,使用期限长。
①  设备
②  资源
③  技术
【单选题】 ( )的评估需要以技术检测为基础
①  资源资产
②  技术资产
③  设备资产
【单选题】 ( )是指设备所具有的工作能力,包括性能、精度、效率、能源消耗等所处的状态及其变化情况。
①  设备技术状态
②  技术状态
③  设备性能状态
【单选题】 设备在负荷下运转并发挥其规定功能的过程,即为( )
①  使用过程
②  操作过程
③  工过程
【单选题】 企业主要生产设备为多班制生产时,必须执行设备( )
①  定人、定机制度
②  交接班制度
③  凭证操作制度
【单选题】 ( )是操作人员正确掌握操作技术性规范,是指导工人正确使用和操作设备的基本文件之一。
①  设备使用规程
②  设备操作规程
③  设备规程
【单选题】 我国《全民所有制工业交通企业设备管理条例》中规定,设备事故分为以下三类:一般事故、重大事故、( )
①  特大事故
②  较大事故
③  轻微事故
【单选题】 润滑剂按照其( )可以分为液体润滑剂、半固体润滑剂、固体润滑剂和气体润滑剂四大类。
①  物理状态
②  化学状态
③  自然状态
【单选题】 ( )是用量最大、品种最多的一类润滑材料,包括矿物润滑油、合成润滑油等。
①  固体润滑剂
②  气体润滑剂
③  液体润滑剂
【单选题】 ( )是利用各种简单工具、复杂仪器对设备的状态进行监测的一种监测方法。
①  状态监测
②  主观状态监测
③  客观状态监测