• 2022-05-29
    有以下程序#include [stdio.h] void main(){ char *s= "120119110"; int n0,n1,n2,nn,i; n0=n1=n2=nn=i=0; do{ switch(s[i++]){ default : nn++; case '0': n0++; case '1': n1++; case '2': n2++; } }while(s[i]); printf("n0=%d,n1=%d,n2=%d,nn=%d\n",n0,n1,n2,nn); }程序的运行结果是( )。[/i]
    A: n0=3,n1=8,n2=9,nn=1
    B: n0=2,n1=5,n2=1,nn=1
    C: n0=2,n1=7,n2=10,nn=1
    D: n0=4,n1=8,n2=9,nn=1