C 练习实例87
C 练习实例87 题目: 回答结果(结构体变量传递)。 程序分析: 无。 实例 // Created by www.codingdict.com on 15/11/9. // Copyright © 2013年 编程字典. All rights reserved. // #include<stdio.h> struct student { int x; char c; } a; int main() { a.x=3; a.c='a'; f(a); printf("%d,%c",a.x,a.c); } f(struct student b) { b.x=20; b.c='y'; } 输出结果为: 3,a
C 练习实例87
题目: 回答结果(结构体变量传递)。
程序分析: 无。
实例
// Created by www.codingdict.com on 15/11/9. // Copyright © 2013年 编程字典. All rights reserved. // #include<stdio.h> struct student { int x; char c; } a; int main() { a.x=3; a.c='a'; f(a); printf("%d,%c",a.x,a.c); } f(struct student b) { b.x=20; b.c='y'; }
输出结果为:
3,a
交流与评论