logo
YourData+
玉东数据
首页专升本CLASSROOM博客工具

C语言程序设计章节练习四:选择结构

pdf
11. (单选)
11. [单选]

若有变量定义float x; int y;则正确的switch语句是(  )。

(A)

switch (x){
    case 1 : printf("**\n");
    case 2 : printf("** \n");
}

(B)

switch (x){
    case 1~2 : printf("**\n");
    case 3~4 : printf("** \n");
}

(C)

switch (1 * y){
    case 1 : printf("**\n");
    case 2 * y : printf("** \n");
}

(D)

switch (y){
    case 1 : printf("**\n");
    case 2 : printf("** \n"); 
}
答案:
解析:

Copyright ©

YourData+2025.甘肃玉东数据有限公司
应用合作解决方案MUI-Remix
18919890888微信同号
陇ICP备2021001826号