填空题
阅读下列程序,则程序的输出结果为{{U}} 【16】 {{/U}}。 #include"stdio.h" struct ty { int data; char c;}; main() { struct ty a={30,'x'}; fun(a); printf("%d%c",a.data,a.c);} fun(struct ty b) { b.data=20; b.c='y';}
1、
【正确答案】
1、30x
【答案解析】
[解析] 本题的参数传递属于值传递,所以函数内不能改变调用函数中的数据。
提交答案
关闭