【单选题】【消耗次数: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
随机题目
【单选题】 一种表示现金的加密序列数,可以用来表示现实中各种金额的币值。
①  电子支票
②  现金
③  电子现金
④  电子货币
【单选题】 是指清偿商品交换和劳务活动以及金融资产交易所引起的债权债务关系,由银行提供的金融服务业务
①  清算
②  支付
③  结算
④  网上支付
【单选题】 下列哪种电子货币不是目前网上常用的
①  储值卡型电子货币
②  银行卡型电子货币
③  电子支票
④  电子现金
【单选题】 为了确保安全,防止伪造,电子现金在实际应用中,主要用到了什么技术
①  数字签名
②  数字证书
③  盲签名
④  数字摘要
【单选题】 首信易支付平台创建于
①  1998.4
②  1999.2
③  1999.3
④  2001.3
【单选题】 由成都富杰信息技术有限公司创建的西部支付,是什么地区第一家网上在线支付平台
①  西部地区
②  西南地区
③  中西部地区
④  中部地区
【单选题】 西部支付与其他第三方支付平台对比,较有特色的服务是推出了
①  西币
②  Q币
③  银行卡
④  借款
【多选题】 现金支付具有以下几个特点
①  现金是最终的支付手段
②  现金支付具有“分散处理”的性质
③  现金支付具有“脱线处理”的性质
④  现金的稀缺性与信誉性
【多选题】 电子现金的支付过程包括
①  购买并储存电子现金
②  用电子现金购买商品或服务
③  资金清算
④  确认订单
【多选题】 在支付全过程中涉及到的系统有
①  支付结算系统
②  支付服务系统
③  支付资金清算系统
④  结算资金清算系统