#include #include #include //** need assert for malloc check struct date {short day, month, year;}; typedef struct date * Datep; typedef struct person { char * first; char * last; struct date birthday; struct person * friend; //** } Person; int main(int argc, char ** argv){ //Datep today = malloc(sizeof(Datep)); Datep today = malloc(sizeof(struct date)); //** assert(today); //** today->month = 2; today->day = 22; today->year = 2017; // create a pointer to a person Person * jane = malloc(sizeof(Person)); assert(jane); //** jane->first = "Jane"; jane->last = "Doe"; jane->birthday = today; printf("jane: %s %s, %02d/%02d/%04d\n", jane->first, jane->last, //jane->birthday).month, jane->birthday->day, jane->birthday->year); jane->birthday.month, jane->birthday.day, jane->birthday.year); free(today); //** free(jane); //** }