单项选择题
下列程序的输出结果是 #include<iostream.h> void main() { char*str="12123434"; int x1=0,x2=0,x3=0,x4=0,i; for(i=0;str[i]!=‘\0’;i++) switch(str[i]) { case’l’:x4++; case’2’:X3++; case’3’:x2++; case’4’:X1++; } cout << X1 << " ," << x2 << " ’" << x3 << " ," << X4; }
A.8,6,4,1
B.8,6,3,2
C.8,8,4,1
D.8,6,4,2