题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-12-15 20:59:14

[单选题]以下程序的主函数中调用了在其前面定义的fun函数 #include <stdio.h> main() {double a[15],k; k=fun(a); } 则以下选项中错误的fun函数首部是()。
A.double fun(double a[15])
B.double fun(double *a)
C.double fun(double a[])
D. double fun(double a)

更多"[单选题]以下程序的主函数中调用了在其前面定义的fun函数 #incl"的相关试题:

[单选题]以下程序的主函数中调用了在其前面定义的fun函数 #include main() {double a[15],k; k=fun(a); } 则以下选项中错误的fun函数首部是()。
A.double fun(double a[15])
B.double fun(double *a)
C.double fun(double a[])
D. double fun(double a)
[单选题]有以下程序 fun(int x) { int p; if(x==0||x==1) return(3); p=x-fun(x-2); return p; } main() { printf("%d\n",fun(7)); } 执行后的输出结果是( )。
A.7
B.3
C.2
D.0
[单选题]有以下程序 #include #define FUN1(a,b) a+b #define FUN2(a,b) a-b #define CAL(a,b) a*b+a+3 main() { printf("%d\n",CAL(FUN1(3,5),FUN2(4,5))); } 执行后的输出结果是( )。
A.29
B.28
C.27
D.30
[单选题]有以下程序 #include “stdio.h” fun(int x, int y){ return (x+y); } void main() { int a=1, b=2, c=3, sum; sum=fun((a++,b++,a+b),c++); printf("%d\n",sum); } 执行后的输出结果是( )。
A.6
B.7
C.8
D.9
[单选题]有以下程序   #include   int fun (int x,int y)   { if (x!=y) return ((x+y);2);   else return (x);   }   main()   { int a=4,b=5,c=6;   printf("%d\n",fun(2*a,fun(b,c)));   }   程序运行后的输出结果是 ()。
A.3
B.6
C.8
D.12
[单选题]有以下程序   #include   void fun(char *c)   { while(*c)   { if(*c>='a'&&*c<='z') *c=*c-('a'-'A');   c++;   }   }   void main()   { char s[81];   gets(s); fun(s); puts(s):   }   当执行程序时从键盘上输入Hello Beijing<回车>,则程序的输出结果是( )。
A.hello beijing
B. Hello Beijing
C.HELLO BEIJING
D. hELLO Beijing
[单选题]有以下程序   #include   int fun()   { static int x=1;   x*=2;   return x;   }   main()   { int i,s=1;   for(i=1;i<=3;i++) s*=fun();   printf("%d\n",s);   }   程序运行后的输出结果是()。
A.0
B.10
C.30
D.64
[单选题]有以下程序 #include int fun() {static int x=1; x*=2; return x; } void main() {int i,s=1; for (i=1;i<=2;i++) s=fun(); printf("%d\n",s); } 执行后的输出结果是( )。
A.1
B.2
C.3
D.4
[单选题]有以下程序 int fun(int x[],int n) {static int sum=0,i; for(i=0;iA.45
B.50
C.60
D.55
[单选题]有以下程序 #include void fun(char *s) { while(*s) { if (*s%2==0) printf("%c",*s); s++; } } void main() { char a[]={"good"}; fun(a); printf("\n"); } 执行后的输出结果是( )。
A.a
B.b
C.c
D.d
[单选题]有以下程序 #include void fun(int *s) { static int j=0; do { s[j]+=s[j+1]; }while(++j<2); } void main() { int k,a[10]={1,2,3,4,5}; for(k=1;k<3;k++) fun(a); for(k=0;k<5;k++) printf("%d",a[k]); } 执行后的输出结果是( )。
A.35756
B.23445
C.35745
D.12345
[单选题]有以下程序 #include void fun(int *p) {printf(“%d\n”,p[5]);} main() {int a[10]={1,2,3,4,5,6,7,8,9,10}; fun(&a[3]); 程序运行后的输出结果是()。
A.5
B.6
C.8
D.9
[单选题]有以下程序 #include fun(int n, int *s) { int f1, f2; if(n==1||n==2) *s=1; else { fun(n-1, &f1); fun(n-2, &f2); *s=f1+f2; } } void main() { int x; fun(6, &x); printf("%d\n", x); } 执行后的输出结果是( )。
A.9
B.8
C.7
D.6
[单选题]有以下程序 #include void fun (char*c,int d) {*c=*c+1;d=d+1; printf("%c,%c,",*c,d); } void main() {char b='a',a='A'; fun(&b,a); printf("%c,%c\n",b,a); } 执行后的输出结果是( )。
A.b,B,b,A
B.b,B,a,A
C.b,b,a,a
D.b,b,A,a

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码