Problems Description
<p class="p0" style="margin-left:24.0000pt;text-indent:-24.0000pt;vertical-align:;"> 1、 若w=1,x=2,y=3,z=4,则条件表达式w<x?w:y<z?y:z的结果为( ) </p> <p class="p0" style="margin-left:24.0000pt;text-indent:-24.0000pt;vertical-align:;"> <span style="line-height:1.5;">A. 4 B. 3 C. 2 D. 1</span> </p> <p class="p0" style="text-indent:21.0000pt;"> <br /> </p> <p class="p0" style="margin-left:24.0000pt;text-indent:-24.0000pt;"> 2、 设x,t均为int型变量,则执行语句“x=10;t=x&&x>10;”后,t的值为( ) </p> <p class="p0"> A.不定值 B.10 C.1 D.0 </p> <p class="p0"> <br /> </p> <p class="p0" style="margin-left:24pt;text-indent:-24pt;"> 3、 关系表达式x<=y<=z的c语言表达式为( ) </p> <p class="p0" style="margin-left:24pt;text-indent:-24pt;"> <span style="line-height:1.5;">A.(x<=y)&&(y<=z) B. (x<=y)AND(y<=z)</span> </p> <p class="p0" style="margin-left:24pt;text-indent:-24pt;"> <span style="line-height:1.5;">C. (x<=y<=z) D.(x<=y)&(y<=z)</span> </p> <p class="p0" style="margin-left:24pt;text-indent:-24pt;"> <span style="line-height:1.5;"><br /> </span> </p> <p class="p0" style="margin-left:24.0000pt;text-indent:-24.0000pt;vertical-align:;"> 4、 points析以下程序, 下列说法正确的是( ) </p> <p class="p0"> #include <stdio.h> </p> <p class="p0"> <span style="line-height:1.5;">void main()</span> </p> <p class="p0"> <span style="line-height:1.5;"> { </span> </p> <p class="p0"> <span style="line-height:1.5;">int x=5,a=0,b=0;</span> </p> <p class="p0"> <span style="line-height:1.5;">if(x=a+b) printf("* * * *\n");</span> </p> <p class="p0"> <span style="line-height:1.5;">else printf("# # # #\n");</span> </p> <p class="p0"> <span style="line-height:1.5;">}</span> </p> <p class="p0"> A. 有语法错,不能通过编译 B. 通过编译,但不能连接 </p> <p class="p0"> C. 输出* * * * D. 输出# # # # </p> <p class="p0"> <span style="line-height:1.5;"><br /> </span> </p> <p class="p0"> <span style="line-height:1.5;">5、 points析以下程序, 下列说法正确的是( ) </span> </p> <p class="p0"> <br /> </p> <p class="p0"> #include <stdio.h> </p> <p class="p0"> <span style="line-height:1.5;">void main()</span> </p> <p class="p0"> <span style="line-height:1.5;"> { </span> </p> <p class="p0"> <span style="line-height:1.5;">int x=0,a=0,b=0;</span> </p> <p class="p0"> <span style="line-height:1.5;">if(x==a+b) printf("* * * *\n");</span> </p> <p class="p0"> <span style="line-height:1.5;">else printf("# # # #\n");</span> </p> <p class="p0"> } </p> <p class="p0"> A. 有语法错,不能通过编译 B. 通过编译,但不能连接 </p> <p class="p0"> C. 输出* * * * D. 输出# # # # </p> <p> <br /> </p> <p class="p0" style="margin-left:24.0000pt;text-indent:-24.0000pt;vertical-align:;"> 6、 若a和b均是正整数型变量,以下正确的switch语句是( ) </p> <p class="p0" style="text-indent:21.0000pt;"> A.switch ( pow(a,2)+pow(b,2)) (注:调用求幂的数学函数) </p> <p class="p0" style="text-indent:21.0000pt;"> { </p> <p class="p0" style="text-indent:21.0000pt;"> case 1: case 3: y=a+b; break ; </p> <p class="p0" style="text-indent:21.0000pt;"> case 0: case 5: y=a-b; </p> <p class="p0" style="text-indent:21.0000pt;"> } </p> <p class="p0" style="text-indent:21.0000pt;"> <span style="line-height:1.5;">B.switch (a*a+b*b);</span> </p> <p class="p0" style="text-indent:21.0000pt;"> { </p> <p class="p0" style="text-indent:21.0000pt;"> case 3: </p> <p class="p0" style="text-indent:21.0000pt;"> case 1: y=a+b; break ; </p> <p class="p0" style="text-indent:21.0000pt;"> case 0: y=b-a; break; </p> <p class="p0" style="text-indent:21.0000pt;"> } </p> <p class="p0" style="text-indent:21.0000pt;"> C.switch a </p> <p class="p0" style="text-indent:21.0000pt;"> { </p> <p class="p0" style="text-indent:21.0000pt;"> default : x=a+b; </p> <p class="p0" style="text-indent:21.0000pt;"> case 10 : y=a-b;break; </p> <p class="p0" style="text-indent:21.0000pt;"> case 11 : y=a*d; break; </p> <p class="p0" style="text-indent:21.0000pt;"> } </p> <p class="p0" style="text-indent:21.0000pt;"> D.switch(a+b) </p> <p class="p0" style="text-indent:21.0000pt;"> { </p> <p class="p0" style="text-indent:21.0000pt;"> case10: x=a+b; break; </p> <p class="p0" style="text-indent:21.0000pt;"> case11: y=a-b; break; </p> <p class="p0" style="text-indent:21.0000pt;"> } </p>
Input格式
Output格式
<span style="font-family:'Microsoft Yahei';font-size:14px;line-height:28px;background-color:#F5F5F5;">#include<stdio.h></span><br /> <br /> <span style="font-family:'Microsoft Yahei';font-size:14px;line-height:28px;background-color:#F5F5F5;">int main()</span><br /> <span style="font-family:'Microsoft Yahei';font-size:14px;line-height:28px;background-color:#F5F5F5;">{</span><br /> <span style="font-family:'Microsoft Yahei';font-size:14px;line-height:28px;background-color:#F5F5F5;">printf("----------");</span><br /> <span style="font-family:'Microsoft Yahei';font-size:14px;line-height:28px;background-color:#F5F5F5;">//例如:本次习题有5problems题,则你的输出格式应为printf("AAAAA");</span><br /> <span style="font-family:'Microsoft Yahei';font-size:14px;line-height:28px;background-color:#F5F5F5;">//选项均由大写A,B,C,D组成,输出语句有一条 </span><br /> <span style="font-family:'Microsoft Yahei';font-size:14px;line-height:28px;background-color:#F5F5F5;">return 0;</span><br /> <span style="font-family:'Microsoft Yahei';font-size:14px;line-height:28px;background-color:#F5F5F5;">} </span>
Sample
Sample Input 1
no input needed
Sample Output 1
参考答案:DDADCA
Submit Code
请先Login后Submit
🤖 AI 解题助手
OpenRouter
就绪