下面程序的输出结果是( )。
public class Sun

public static void main(String args[ ])

int i = 9;
switch (i)

default:
System.out.println("default");
case 0:
System.out.println("zero");
break;
case 1:
System.out.println("one");
case 2:
System.out.println("two");


A:defaun B:defauh, zero C:error default clause not defined D:no output displayed

下列程序的输出结果是 【14】
#include<iostream.h>
void main( )

inta(5),b(6),i(0)1j(0);
switch(a)

case 5:switch(b)

case 5:i++;break;
case 6:j++;break;
defaun:i++;j++;

case 6:i++;
j++;
break;
default:i++;j++;

cout<<i<<","<<j<<endl;
)

下面程序的输出结果是( )。 public class Sun { public static void main(String args[ ]) { int i = 9; switch (i) { default: System.out.println("default"); case 0: System.out.println("zero"); break; case 1: System.out.println("one"); case 2: System.out.println("two"); } } }

A:defaun B:defauh, zero C:error default clause not defined D:no output displayed

下列程序的输出结果是 【14】 。 #include<iostream.h> void main( ) { inta(5),b(6),i(0)1j(0); switch(a) { case 5:switch(b) { case 5:i++;break; case 6:j++;break; defaun:i++;j++; } case 6:i++; j++; break; default:i++;j++; } cout<<i<<","<<j<<endl; )

微信扫码获取答案解析
下载APP查看答案解析