Pointer to Struct
To access data in the struct through a variable use the “.” operatormyself.first_name = “Aya”;
You can also define a pointer to a struct, in which case use the “->” operator
ID per1, per2, *per3; /* or struct personal_id */per1.id_number = 213425;per2.id_number = 1113242;per3 = (ID*)malloc(sizeof(ID));per3->id_number = 2001011;or(*per3).id_number = 2001011;
per3->father = &per2;strcpy(per3->father->last_name, per1.last_name);
note: the operators “.” and “->” have the same precedence (the highest), and are associated left to right