现有如下程序段,此程序段编译有错误,则程序段的错误出在 #include<stdio.h> main() { int a=30,b=40,c=50,d; d=a>30? b:c; swish(d) { case a: Printf("%d,",a); case b: printf("%d,",b); case c: printf("%d,",c); default printf("#");}}
A.default:printf("#");这个语句
B.d=a>30? b:c;这个语句
C.case a:printf("%d,",a);case b:printf("%d,",b);case c:printf("%d,",c);这三个语句
D.switch(d)这个语句
现有如下程序段,此程序段编译有错误,则程序段的错误出在
#include
main()
{ int a=30,b=40,c=50,d;
d=a >30?b:c;
switch(d){case a:printf("%d,",a);
case b:printf("%d,",b);
case c:printf("%d,",c);
default:printf("#");}}
A.default:printf("#");这个语句
B.d=a>30?b:c;这个语句
C.case a:printf("%d,",a); case b:printf("%d,",b); case c:printf("%d,",c);这三个语句
D.switch(d)这个语句
现有如下程序段,则程序段的输出结果为 【16】 。
#include "stdio.h"
int fun()
{static int k;
return k;}
main()
{int m;
m=fun();
printf("%d\n",m);}
现有如下程序段
#include "stdio.h"
main()
{int a[5][6]={23,3,65,21,6,78,28,5,67,25,435,76,8,22,45,7,8,34,6,78,32,4,5,67,4,21,1};
int i=0,j=5;
printf("%d\n",*(&a[0][0]+2*i+j-2));}
则程序的输出结果为
A.21
B.78
C.23
D.28
有如下程序段: #include <stdio.h> #define Max(a,b) a>b?a:b main() { int a=5,b=6,c=4,d; d=c+Max(a,b) ; printf("%d",d) ; } 其输出结果为______。
A.10
B.5
C.6
D.编译错误
现有如下程序段
#include "stdio.h"
int *fun(int *a,int *b)
{int c;
c=*a%*b;
return &c;}
main()
{int a=5,b=19,*c;
c=fun(&a,&b);
printf("%d\n",++*c);}
则程序段执行后的结果为
A.8
B.7
C.6
D.5
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!