题目内容

以下程序的运行结果是 。#include main(){int swap();extern int a,b;a=3;b=10;swap();printf("a=%d,b=%d\n",a,b);}int a,b;swap(){int temp;temp=a;a=b;b=temp;}

查看答案
更多问题

#include void sub(float x,float *y,float *z){*y=*y-1.0;*z=*z+x;}void main(){float a=2.5,b=9.0,*pa,*pb;pa=&a;pb=&b;sub(b-a,pa,pa);printf("%g\n",a);}

以下程序的运行结果是 。#include int f(int b[],int n){int i,r=1;for (i=0;i<=n;i++)r=r*b[i];return r;}void main(){int x,a[]={2,3,4,5,6,7,8,9};x=f(a,3);printf("%d\n",x);}

以下程序的运行结果是 。#include void func(int b[]);void main(){int a[]={5,6,7,8},i;func(a);for (i=0;i<4;i++)printf("%d ",a[i]);printf("\n");}void func(int b[]){int j;for (j=0;j<4;j++)b[j]=2*j;}

以下程序的运行结果是 。#include int func(int a,int b){int c;c=a+b;return c;}void main(){int x=6,y=7,z=8,r;r=func((x--,y++,x+y),z--);printf("%d\n",r);}

答案查题题库