/* ex04.c */ #include struct Course { char name[80]; char number[32]; int crn; }; int main() { struct Course c1; struct Course c2; struct Course * c3; c3 = (struct Course *)malloc( sizeof( struct Course ) ); int section = 1; c1.crn = 80555; strcpy( c1.name, "Network Programming" ); sprintf( c1.number, "CSCI-4220-%02d", section ); (*c3).crn = 1234; c3->crn = 1234; /* etc */ /* create an array of struct */ struct Course * c4 = (struct Course *)malloc( 100 * sizeof( struct Course ) ); c4 = (struct Course *)calloc( 100, sizeof( struct Course ) ); return 0; }