[单项选择]Questions 11--13 are based on the following passage. What is the passage mainly about A. How people’ interest in languages began. B. Languages today and the past. C. The important language families. D. The English languages in constant change.
第8题: [单项选择]有以下程序: main( ) int k=5, n=0; do switch(k) case 1:case 3:n+:1;k--;break; default:n:0;k--; case 2:case 4:n+=2;k--;break;
printf("%d",n): while(k>0 && n<5);
程序运行后的输出结果是( )。 A. 235 B. 0235 C. 02356 D. 2356 参考答案:A 答案解析:[解析] 因为变量的初始值分别为“k=5,n=0”,所以程序第一次进入循环时,执行default语句,这时k=4,执行“case 4”这个分支,结果是“n=2,k=3”,打印出2;程序然后进行第二次循