问题
填空题
有以下程序
#include <stdio.h>
typedef struct
int num;double s;REC;
void funl(REC x) x.num=23;x.s=88.5;
main()
REC a=16,90.0);
funl(a);
printf(”%d\n“,a.num);
程序运行后的输出结果是______。
答案
参考答案:P
解析: 主函数中,通过funl()函数将a值传递给x,但没有把形参x的值返回,此时变量a的值并没有发生变化,所以输出a.Hum的值为16。