This is from the following webpage: http://c.learncodethehardway.org/book/ex16.html
....deleted code
struct Person {
char *name;
int age;
int height;
int weight;
};
struct Person *Person_create(char *name, int age, int height, int weight)
{
struct Person *who = malloc(sizeof(struct Person));
assert(who != NULL);
who->name = strdup(name);
who->age = age;
who->height = height;
who->weight = weight;
return who;
}
[Rest of code not shown]
I am not able to understand the statement "struct Person *who = malloc(sizeof(struct Person));
This statement is inside struct Person *Person_create function. So what exactly is struct Person *who doing?