针对下列程序段[1],需要()个测试用例[2]才可以满足语句覆盖的要求。 switch(value) case 0: other=30; break; case 1: other=50; break; case 2: other=300; case 3: other=other/value; break; default: other=other * value; A.2 B.3 C.4 D.5

针对下列程序段[1],需要()个测试用例[2]才可以满足语句覆盖的要求。 switch(value) case 0: other=30; break; case 1: other=50; break; case 2: other=300; case 3: other=other/value; break; default: other=other * value;
A.2
B.3
C.4
D.5

参考答案与解析:

相关试题

针对下列程序段,需要(52)个测试用例才可以满足语句覆盖的要求。 switch(

[单选题]针对下列程序段,需要(52)个测试用例才可以满足语句覆盖的要求。 switch(value){ case 0: ther=30; break; case 1: ther=50; break; case 2: ther=300; case 3: ther=other/value; break; default: ther=other * value; }A.2B.3C.4D.5

  • 查看答案
  • 针对下列程序段,需要______个测试用例才可以满足语句覆盖的要求。 Switc

    [单选题]针对下列程序段,需要______个测试用例才可以满足语句覆盖的要求。Switch(value){C.ase 0:ther=30;B.reak;C.ase 1:ther=50;B.reak;C.ase 2:ther=300;C.ase 3:ther=other/value;B.reak;D.efault;ther=other*value;}A.) 2B.) 3C.) 4D.) 5A.B.C.D.

  • 查看答案
  • 针对下列程序段,需要______个测试用例才可以满足语句覆盖的要求。 Switc

    [单选题]针对下列程序段,需要______个测试用例才可以满足语句覆盖的要求。Switch(value){C.ase 0:0ther=30;B.reak;C.ase 1:ther=50;B.reak;C.ase 2:ther=300;C.ase 3:ther=other/value;B.reak;D.efault:ther=other * value;}A.) 2B.) 3C.) 4D.) 5A.B.C.D.

  • 查看答案
  • 试题(52)针对下列程序段,需要(52)个测试用例才可以满足语句覆盖的要求。(5

    [单选题]试题(52)针对下列程序段,需要(52)个测试用例才可以满足语句覆盖的要求。(52)A.2B.3C.4D.5

  • 查看答案
  • 针对下列程序段,需要(58)个测试用例可以满足分支覆盖的要求。 int Is

    [单选题] 针对下列程序段,需要(58)个测试用例可以满足分支覆盖的要求。int IsLeap(int year){if ( year % 4 == 0 ){if ( ( year % 100 == 0 ){if ( year % 400 == 0 )leap = 1;elseleap = 0;}elseleap = 1;}elseleap = 0;return leap;}(58)A.3B.4C.6D.7

  • 查看答案
  • 针对下列程序段,需要(58)个测试用例可以满足分支覆盖的要求。int IsLea

    [单选题]针对下列程序段,需要(58)个测试用例可以满足分支覆盖的要求。 int IsLeap(int year) { if(year % 4==0) { if((year % 100==0) { if(year % 400==0) leap=1; else leap=0; } else leap=l; } else leap=0; return leap; }A.3B.4C.6D.7

  • 查看答案
  • 下列程序段的执行结果为 a=2 b=0 Select Case a Case 1

    [单选题]下列程序段的执行结果为 a=2 b=0 Select Case a Case 1 Select Case b Case 0 Print " * * 0 * *" Case 1 Print" * * 1 * *" End selec Case 2 Print " * * 2 * *" End SelectA.* * 0 * *B.* * 1 * *C.* * 2 * *D.0

  • 查看答案
  • 针对以下程序段,对于变量c的取值,至少需要(61)个测试用例才能够满足语句覆盖的

    [单选题]针对以下程序段,对于变量c的取值,至少需要(61)个测试用例才能够满足语句覆盖的要求。c=((u8_t*)q->payload)[i];switch(c){case SLIP_END: sio_send(SLIP_ESC,netif->state); sio_send(SLIP_ESC_END,netif->state); break;case SLIP_ESC: sio_send(SLIP_ESC,netif->state); sio_send(SLIP_ESC_ESC,netif->stat

  • 查看答案
  • 下列程序段的执行结果为()。a=1b=0Select Case a Case 1

    [单选题]下列程序段的执行结果为( )。 a=1 b=0 Select Case a Case 1 Select Case b Case 0 Print"**1**" Case 1 Print"**1**" End Select Case 2 Print"**2**" End SelectA.**0**B.**1**C.**2**D.0

  • 查看答案
  • 下面的程序段中,(53)是语句覆盖测试用例,(54)是判定覆盖测试用例。 if(

    [单选题]下面的程序段中,(53)是语句覆盖测试用例,(54)是判定覆盖测试用例。if(a<80)b=0;else if(a<=150)b=5;else if(a<200)b=8;else b=1;A.a=(80,150,200,201)B.a=(80,81,199,200)C.a=(79,149,200,201)D.a=(79,150,199,200)

  • 查看答案