8.5结构作为函数的参数
1.函数的反回值是结构体类型;如:
struct st {int a;char b;}
struct st fun(struct st x)
{x.a=99;x.b='s';return x;}
main()
{
struct st y;
y.a=0;y.b='A';
printf("y.a=%d y.b=%c\n",y.a,y.b);
y=fun(y);
printf("y.a=%d y.b=%c\n",y.a,y.b);
}
2.函数的返回值可以是指向结构体变量的指针。
8.6 结构的自引用
3.利用结构体变量构成链表。
动态链表: