c语言
#include "stdio.h"
typedef struct test //建立结构体
{
int a;
int b;
int c;
}T;
T testt(int aa,int bb,int cc) //建立函数
{
T aaa;
aaa.a=aa*bb;
aaa.b=aa*cc;
aaa.c=bb*cc;
return aaa; //返回结构
}
int main()
{
T b=testt(4,5,6);
printf("%d %d %d \n",b.a,b.b,b.c);
T *f=&b;
printf("%d %d %d",f->a,f->b,f->c);
}