以下程序运行时,从键盘输入:01,程序执行后的输出结果是
#include
int main( )
{
char k;
int i;
for(i=1;i<3;i++)
{
scanf("%c",&k);
switch(k)
{
case '0': printf("another\n");
case '1': printf("number\n");
}
}
return 0;
}
A、another
number
number
B、number
number
C、another
number
D、another
number
another
#include
int main( )
{
char k;
int i;
for(i=1;i<3;i++)
{
scanf("%c",&k);
switch(k)
{
case '0': printf("another\n");
case '1': printf("number\n");
}
}
return 0;
}
A、another
number
number
B、number
number
C、another
number
D、another
number
another
C语言程序设计精髓