请读程序: #include 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、11.100000B、12.100000C、21.100000D、1.100000

请读程序: #include 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、11.100000
  • B、12.100000
  • C、21.100000
  • D、1.100000

相关考题:

以下四个程序中,完全正确的是( )。A.includeB.include main(); main() {/*pr 以下四个程序中,完全正确的是( )。A.#include<stdio.h>B.#include<stdio.h> main(); main() {/*programming*/ {/*/programming/*/ printf("programming!\n");} printf("programming!\n");}C.#include<stdio.h>D.include<stdio.h> main() main() {/*/*programming*/*/ {/*programming*/ printf("programming!\n");} printf("programming!\n");}

请阅读以下程序:includeincludevoid fun(int b[]){static int i=0;do{b[i] 请阅读以下程序: #include<stdio.h> #include<string.h> void fun(int b[]) { static int i=0; do {b[i]+=b[i+1]; }while(++i<2);} main() { int k,a[5]={1,3,5,4,9}; fun(A); for(k=0;k<5;k++)printf("%d",a[k]);} 上面程序的输出是( )。A.13579B.48579C.48549D.48999

下列程序的输出结果是()。 include VOid p(int *x) {printf("%d",++*x); } void main() 下列程序的输出结果是( )。#include<stdio.h>VOid p(int *x){ printf("%d",++*x);}void main(){ int y=3;p(y);}A.3B.4C.2D.5

请读程序: include f(int b[],int n) { int i,r; r=l; for(i=0;i 请读程序: # include<stdio.h> f(int b[],int n) { int i,r; r=l; for(i=0;i<=n;i++)r=r*b[i]; return r; } main() { int x a[]={2,3,4,5,6,7,8,9}; x=f(a,3); printf ("%d\n",x); } 上面程序的输出结果是 ( )A.720B.120C.24D.6

请读程序:includemain(){int a,b; for(a = 1,b = 1 ;a=20)break;if 请读程序: #include <stdio.h> main() { int a,b; for(a = 1,b = 1 ;a <= 100;a++) { if(b>=20) break; if(b%3 ==1) { b +=3;continue; } b-=5; } printf("%d\n",a); } 上面程序的输出结果是( )。A.7B.8C.9D.10

有以下程序include void WriteStr(char*fn,char*str){FILE*fp; fp=fopen(fn,"w");fpu 有以下程序 #include <stdio.h> void WriteStr(char *fn, char *str) { FILE *fp; fp=fopen(fn,"w"); fputs(str,fp);fclose(fp); } main() { WriteStr("t1.dat","start"); WriteStr("t1.dat","end"); } 程序运行后,文件t1.dat中的内容是A.startB.endC.startendD.endrt

下列程序的输出结果是()。includevoid p(int *x){printf("%d",++*x);}void main(){int 下列程序的输出结果是( )。 #include<stdio.h> void p(int *x) { printf("%d",++*x); } void main() { int y=3; p(y); }A.3B.4C.2D.5

以下程序的输出结果是( )。 include void fun(int x) {if(x/2>0)fun(x/2); printf("%d", 以下程序的输出结果是( )。include<stdio.h>void fun(int x){ if(x/2>0)fun(x/2);printf("%d",x);}main(){fun(3);printf("\n");}

下列程序的输出结果是【 】。include void swap(int *a, int *B) { int *t; t=a;a=b;b=t; 下列程序的输出结果是【 】。include <stdio.h>void swap(int *a, int *B){int *t;t=a;a=b;b=t;}main(){int i=3,j=5,*p=i,*q=j;swap(p,q);printf("%d %d\n",*p,*q);}

有以下程序 include typedef struct { int num;double s; }REC; void funl(REC *x) { x 有以下程序 include<stdio.h> typedef struct { int num;double s; }REC; void funl(REC *x) { x->num=23;x->s=88.5; } void main() { REC a={16,90.0}; fun1(A); printf("%d\n",a.num); } 程序运行后的输出结果是( )。

以下程序的输出结果是______。include void swap(int *a, int *b){ int *t;}{ int i=3,j 以下程序的输出结果是______。include <stdio.h>void swap(int *a, int *b){ int *t;}{ int i=3,j=5,*p=i,*q=j;swap(p,q); printf("%d %d\n",*p,*q);

以下程序段给数组A的所有元素输入数据,请填空。 include void main () {int a[10], 以下程序段给数组A的所有元素输入数据,请填空。include<iostream. h>void main () {int a[10], i;i=0;while (i<10) cin>> 【 】}

include “stdio.h” void main() { int sum=0,a=11; while(a #include “stdio.h” void main() { int sum=0,a=11; while(aA. sum=0B. sum=55C. sum=10D. sum=11

有以下程序: include void funl (char * p){char * q; q=p; while( *q! ='\0') } (*q) 有以下程序: #include <stdio.h>void funl (char * p){ char * q; q=p; while( *q! ='\0') } (*q) ++;q++;}mains( ){ char a[ ] = { "Program" } , * p; p = a[3]; fun1 (p); printf("% s \n" ,a);}程序执行后的输出结果是( )。A.ProhsbnB.PrphsbnC.ProgsbnD.Program

有以下程序 include void fun(char **p) { ++p; printf("%s\n",*p); 有以下程序 #include <stdio.h> void fun(char **p) { ++p; printf("%s\n",*p); } main() { char *a[]={"Moming","Afternoon","Evening","Night"}; fun(a); } 程序的运行结果是A.AfternoonB.fternoonC.MorningD.orning

下列程序的运行结果为【】。 include include {int a; char b[10]; double c;}; 下列程序的运行结果为【 】。include<stdio.h>include<string.h>{ int a; char b[10]; double c; };void f (struct A *t);main(){ struct A a={1001,"ZhangDa",1098.0};f(a) ; printf("%d,%s,%6.lf\n",a.a,a.b,a.C);}void f(struct A*t){ strcpy(t->b, "ChangRong");}

请读程序:includeincludemain(){char *s1="AbCdEf",*s2="aB"; s1++;s2++; 请读程序: #include<stdio.h> #include<string.h> main() { char *s1="AbCdEf",*s2="aB"; s1++;s2++; printf("%d\n",strcmp(s1,s2)); } 上面程序的输出结果是______。A.正数B.负数C.零D.不确定的值

已知程序的结果为1 2 3,请填空。 include template class A { public: T X, 已知程序的结果为1 2 3,请填空。include<iostream.h>template<class T>class A{public:T X, y, z;void display( ) {cout < < x < < " " < < y < < " " < < z;}};void main( ){A<int>a1;_______________a1.display( ) ;}

请读程序: include void fun(int * s) { static int j=0; do s[j]+=s[j+1] 请读程序: # include<stdio.h> void fun(int * s) { static int j=0; do s[j]+=s[j+1] while( + + j<2); } main( ) { int k,a[10]={l,2,3,4,5}; for(k=l;k<3;k+ +)fun(a); for(k=0;k<5;k++)prinf("%d",a[k]); } 上面程序的输出结果是 ( )A.34756B.23445C.35745D.12345

请读程序: includef(char * s){cahr * p=s;while(* p!='\0')p++;return(p-s);}main(){ 请读程序: # include<stdio.h> f(char * s) {cahr * p=s; while(* p!='\0')p++; return(p-s); } main() {printf("%d\n”,f("ABCDEF"));} 上面程序的输出结果是 ( )A.3B.6C.8D.0

请读程序: includde include void fun(char * s) {char a[10]; str 请读程序: # includde<stdio.h> # include<string.> void fun(char * s) {char a[10]; strcpy(a,"STRING"); s=a; } main() { char*p; fun(p); print{("%s\n",p); } 上面程序的输出结果(表示空格) ( )A.STRINGB.STRINGC.STRINGD.不确定的值

有以下程序,程序执行后,输出结果是【】include void fun(int*A) {a[0]=a[1];} main() {i 有以下程序,程序执行后,输出结果是【 】include<stdio.h>void fun(int*A){ a[0]=a[1];}main(){ int a[10]={10,9,8,7,6,5,4,3,2,1,},i;for(i=2;i>1=0;i-) fun(a[i]);for(i=0;i<10;i++) printf("%d,a[i]);printf("\n");}

有如下程序: include using namespace std; int main() { void fu 有如下程序: #include<iostream> using namespace std; int main() { void function(double val); double val; function(val); cout<<val; return 0; } void function(double val) { val=3; } 编译运行这个程序将出现的情况是A.编译出错,无法运行B.输出:3C.输出:3.0D.输出一个不确定的数

请读程序:includemain(){int a=5,b=7,c=9;pintf("%d,%d,"a,b,C) ;printf("%d,%d",a,D) 请读程序: #include<stdio.h> main() { int a=5,b=7,c=9; pintf("%d,%d,"a,b,C) ; printf("%d,%d",a,D) ; } 上面程序的输出结果是_______。A.5,7,9,5,7B.5,7,5,7C.5,7,不定7,9D.5,7,5,7,不定

请读程序:includefunc(int a,int b) { int c; c=a+b; return c;}main(){ int x=6,y=7, 请读程序: #include<stdio.h> func(int a,int b) { int c; c=a+b; return c; } main(){ int x=6,y=7,z=8,r, r=func((x-,y++,x+y),z-); printf("%d\n",r); } 上面程序的输出结果是_______。A.11B.20C.21D.31

有以下程序: include include void f(char * s,char*t){char k; k=*s;*s=* 有以下程序: #include <stdio.h>#include <string.h>void f(char * s,char*t){ char k; k=*s; *s=*t; *t=k; s++; t--; if( * s) f(s,t);}main( ){ char str[10] :"abedefg", * p; p = str + strlen(str)/2+1; f(p,p -2); printf( "% s \n" ,str);程序运行后的输出结果是( )。A.abcdefgB.gfedcbaC.gbcdefaD.abedcfg

下列程序的输出结果是()。 include void main() {int a=0,b=1,c=2; if(++a>0‖++b>0) + 下列程序的输出结果是( )。#include<stdio.h>void main(){ int a=0,b=1,c=2;if(++a>0‖++b>0)++C;printf("%d,%d,%d",a,b,C) ;}A.0,1,2B.1,2,3C.1,1,3D.1,2,2

请读程序: includemain(){int num=0;while(num 请读程序: # include<stdio.h> main( ) {int num=0; while(num<=2) {num+ +;printf("%d\n",num);} } 上面程序的输出结果是 ( )A.1B.1 2C.1 2 3D.1 2 3 4