struct ty { int data;;char c;}; main(){struct ty a

发布时间:2021-02-16 19:31:34

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'}

网友回答

打印的是30x,因为调用函数f并无改变a的值,只是改变形参b的值,函数结束后b被销毁
以上问题属网友观点,不代表本站立场,仅供参考!