A-A+

#include<stdio.h>int ast(int x int y int*cp in

2022-08-06 10:45:21 问答库 阅读 178 次

问题详情

#include<stdio.h>
int ast(int x,int y,int*cp,int*dp)
{*cp=x+y;
*dp=x-Y;
}
main()
{int a,b,C,d;
a=4;b=3;
ast(a,b,&c,&d);
printf("%d%dn",c,d);
}

参考答案

正确答案:
7 1 [解析]
#include<stdio.H>
int ast(int x,int y,int*cp),int*dp)/*关于变量c和d的参数传递是地址传递的方式*/
{*cp=x+y;
*dp=x-y;
}
main()
{int a,b),c.d;
{a=4;b=3;
ast(a,b,&c,&d);/*调用函数ast()*/
prinlf("%d%d\n",c,d);
}

考点: