首页 试题详情
单选题

执行下面程序段后,s的值是().int s=6;switch( s){ case 6:case 7:s =2;case 8:case 9:s =2;}

A11

B10

C8

D9

正确答案:A (备注:此答案有误)

相似试题

  • 单选题

    执行下面一段C程序,变量ret为( )。char str[20];int ret=strlen(strcpy(str,”Hello_World”));

    答案解析

  • 单选题

    执行下面一段C程序,输出结果变量应为______。sub (int x, int y, int *z) { *z=y-x; } main() { int a, b, c; sub (10, 5, &a); sub(7, a, &b); sub(a, b, &c); printf (%d, %d, %d n, a, b, c); }

    答案解析

  • 单选题

    下面程序输出结果是(   ) #include using namespace std; void fun(int x,int y,int z){ z=x*x+y*y; }int main( ){ int z=68; fun(5,2,z); cout

    答案解析

  • 单选题

    下面程序输出结果为(   ) #include using namespace std; int main( ) { int a[3][3]={{1,2},{3,4},{5}}; int s=0; for (int i=1;i

    答案解析

  • 单选题

    执行语句 int i=10,*p=&i; 下面描述错误(   )。

    答案解析

热门题库