#include #include #include #define LINE_LENGTH 40 int main() { struct cast { char actor[18]; int age; char role[16]; }; struct cast *star; /* create structure pointer */ int line; /* Get memory chunk */ star = (struct cast *)malloc(sizeof(struct cast)); 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); }