#include #include #include #define LINE_LENGTH 40 int main() { struct cast { char actor[18]; int age; char role[16]; }; typedef struct cast OZ; /* Create typedef shortcut OZ */ OZ *star; /* allocate OZ struct poitner */ int line; star = (OZ *)malloc(sizeof(OZ)); /* get OZ memory chunk */ if(star == NULL) { puts("Memory alloation failed"); return(0); } strcpy(star->actor,"Judy Garland"); star->age = 17; strcpy(star->role,"Dorothy"); puts("Wizard of Oz Database!\n"); /* draw the table heading */ printf("%-18s %3s %-15s\n","Actor","Age","Role"); for(line=0;lineactor,\ star->age,\ star->role); return(0); }