i'm learning about structures in c and there are few tips confusing me so if we have a struct like this
struct Person{
char* name;
int age;
int weight;
int height;
};
now it is a compound datatype that i can deal with like other data types.. when i make pointer to this structure
struct Person pointer=malloc(sizeof(Person));
now c point to an address in the memory with the size if the struct my question is
A)is really c know that Person consists of 4 variable with names name,age,weight,height and make copy to this entity to new place which pointer points to ?
B)what is the difference in this two syntax ?
struct Person *pointer=(Person*)malloc(sizeof(Person));
struct Person *pointer=malloc(sizeof(Person));
C)i'm not familiar with this function deceleration syntax so can any one clear up it to me (name of function is an pointer) ?
struct Person *Person_create(char* name, int age, int height, int weight){...}