c struct pointer to function code example
Example: return pointer to struct in C
typedef struct {
char name[20];
int age;
} Info;
Info* GetData() {
Info *info;
info = (Info *) malloc( sizeof(Info) );
scanf("%s", info.name);
scanf("%d", &info.age);
return info;
}