填空题
有以下程序:
#inciude<stdio.h>
int *f(int *P,int *q);
main()
int m=1,n=2,*r=&m;
r=f(r,&n);printf("%d/n",*r);
int *f(int*p,int*q)
return(*p>*q)?p:q;
程序运行后的输出结果是
(11)
1、
【正确答案】
1、2
【答案解析】
[解析] 函数*f(int*p,int*q)的功能是返回两个数中较大数的指针,所以主函数中,返回变量n的指针,程序运行后的输出结果是2。
提交答案
关闭