[单选题]

请读程序:#includevoidfun(float*pl,float*p2,float*s){s=(float*)calloc(1,sizeof(float));*s=*p1+*(p2++);}main(){floata[2]={1.1,2.2},b[2]={10.0,20.0},*s=a;fun(a,b,s)printf(""%f/n"",*s);}上面程序的输出结果是()

A . 11.100000

B . 12.100000

C . 21.100000

D . 1.100000

参考答案与解析:

相关试题

请读程序:#include<stdio.h>void fun(float *pl

[单选题]请读程序:#include<stdio.h>void fun(float *pl, float *p2, float *s){ s=( float * )calloc( 1, sizeof(float));*s=*p1+ *(p2++);}main(){ float a[2]={1.1, 2.2}, b[2]={10.0, 20.0}, *s=a;fun(a, b, s)printf(""%f/n"",*s);}上面程序的输出结果是()A .

  • 查看答案
  • 以下程序的输出结果是void fun(float*p1,float*p2,flo

    [单选题]以下程序的输出结果是 void fun(float*p1,float*p2,float*s) { s=(float*)calloc(1,sizeof(float)); *s=*p1+*p2++;} main() { float a[2]={1.1,2.2},b[2]={10.0,20.0},*s=a; fun(a,b,s); printf("%5.2f/n",*s);}A.11.1B.12C.21.1D.1.1

  • 查看答案
  • 请读程序:includemain(){ int a;float b,c; sca

    [单选题]请读程序:includemain(){ int a;float b,c; scanf("%2d%3t%4f",&a,&b,&c); printf("/na请读程序:include<stdio.h>main(){ int a;float b,c; scanf("%2d%3t%4f",&a,&b,&c); printf("/na=%d,b=%f,c=%f/n",a,b,c);}若运行时从键盘上输入(图片),则上面程序的输出结果是______。A.a=98,b=765,c=4321B.a

  • 查看答案
  • 请读程序:#includemain(){int a;float b,c;scan

    [单选题]请读程序:includemain(){int a;float b,c;scanf("%2d%3f%4f",&a,&b,&c) ;请读程序: #include<stdio.h> main() { int a;float b,c; scanf("%2d%3f%4f",&a,&b,&c) ; printf("/na=%d,b=%f,c=%f/n",a,b,c) ; } 若运行时从键盘上输入9876543210,↓,则上面程序的输出络果是___

  • 查看答案
  • 请读程序:#includemain(){int a;float b,c;scan

    [单选题]请读程序:includemain(){int a;float b,c;scanf("%2d%3f%4f",&a,&b,&c);p请读程序: #include<stdio.h> main() { int a;float b,c; scanf("%2d%3f%4f",&a,&b,&c); printf("/na=%d,b=%f,c=%f/n",a,b,c) } 若运行时从键盘上输入987643210则上面程序的输出结果是______。A.a

  • 查看答案
  • 请读程序:#include main(){int a; float b, c;s

    [单选题]请读程序:include main(){int a; float b, c;scanf ("% 2d% 3%£¯4f",&a,&b,&a请读程序:#include <stdio. h>main(){ int a; float b, c; scanf ("% 2d% 3%/4f",&a,&b,&c); printf("/na=%d, b=%f, c=%f/n", a, b, c);} 若运行时从键盘上输入9876543210,则上面程序的输出结果

  • 查看答案
  • 有以下程序float fl(floatn){returnn*n;}float f

    [单选题]有以下程序 float fl(float n) { return n*n; } float f2(float n) { return 2*n;} main() {float(*p1)(float),(*p2)(float),(*t)(float),y1,Y2; p1=f1; p2=f2; y1=p2(p1(2.O)); t=p1; p1=p2; p2=t; y2=p2(pl(2.0)); printf("%3.0f,%3,Of/n",y1,y2); } 程序运行后的输出结果是A.8,16B.

  • 查看答案
  • 有以下程序:#include float f1 (float n ){retur

    [单选题]有以下程序:include float f1 (float n ){return n*n;}float f2 ( float n){return 2有以下程序:#include <stdio.h>float f1 (float n ){ return n*n;}float f2 ( float n){ return 2 * n;}main( ){ float ( * p1)(float),( * p2)(float),(*t)(float) ,y1,y2; p1 = f1;p2 = f2; y1

  • 查看答案
  • 有以下程序: float f1(float n) { return n*n; }

    [单选题]有以下程序: float f1(float n) { return n*n; } float f2(float n) { return 2*n; } main() {float(*p1)(float),(*p2)(float),(*t)(float),y1,y2; p1:f1; p2=f2; y1=p2(p1(2.0)); t=p1; p1=p2; p2=t; y2=p2(p1(2.0)); printf("%3.0f,%3.0f/n",y1,y2); } 程序运行后的输出结果是 _____

  • 查看答案
  • 有以下程序#includevoid fun(float* p1,int n1,f

    [单选题]有以下程序includevoid fun(float* p1,int n1,float,*p2,int n2,float* s){ int i;s=(有以下程序 #include<stdio.h> void fun(float * p1,int n1,float,*p2,int n2,float * s) { int i; s=(float *)calloc(1,sizeof(float)); *s=0; for(i=0;i<n1;i++) *s+=*p1++; for(i=0;i<n2;i++

  • 查看答案
  • 请读程序:#includevoidfun(float*pl,float*p2,f