A)#include B)#include
main(); main()
{/*programming*/ {/*/programming/*/
printf(“programming!\n”); } printf(“programming!\n”);}
C) #include D) include
main() main()
{/*/*programming*/*/ {/*programming*/
printf(“programming!\n”);} printf(“programming!\n”);}
答案是B,错没呀?我觉得应该是C呀
若有定义:float x=1.5; int a=1,b=3,c=2;则正确的switch语句是
A)switch(x) B) switch((int)x);
{case 1.0: printf(“*\n”); {case 1: printf(“*\n”);
Case 2.0: printf(“**\n”); } case 2: printf(“**\n”);}
C) switch(a+b) D) switch(a+b)
{ case 1: printf(“*\n”); {case 1: printf(*\n”);
case 2+1: printf(“**\n”);} case c: printf(“**\n”);}
考查的是什么?我不知道怎么入手!郁闷死了----------------解决方案--------------------------------------------------------
对于第一个:应该是B:(考察C语言的注释)
第二个:应该是B:(考察switch语句的用法)
----------------解决方案--------------------------------------------------------
第二题:B/C 都对
----------------解决方案--------------------------------------------------------
[此贴子已经被作者于2007-4-2 17:27:39编辑过]
----------------解决方案--------------------------------------------------------
1.C
2.C
----------------解决方案--------------------------------------------------------
第一次看见题还有这样考的
长见识了~~~```
----------------解决方案--------------------------------------------------------
抄袭二楼的注释
1.B
2.C
关键知道题目要考查的是什么!
----------------解决方案--------------------------------------------------------
考一些语法知识
----------------解决方案--------------------------------------------------------
第二题B错了
switch((int)x); 多了个";"
A中大小写有问题
全都是语法知识
----------------解决方案--------------------------------------------------------
第一题中C是有问题的
/*/*programming*/*/只有这部分是注释/*/*programming*/,后面还有一个*/系统会认为是代码,所以错了
----------------解决方案--------------------------------------------------------