#include #include #include #include void main() { struct st_info { int number; char name[30]; char description[128]; }; struct st_info *episode; puts("My Star Trek Database"); episode = (struct st_info*)malloc(sizeof(struct st_info)); if(episode==NULL) { puts("No more memory, dude!"); exit(0); } /* Fill the structure using pointers */ episode->number = 29; strcpy(episode->name,"Operation: Annihilate!"); strcpy(episode->description,"The one where they beam down to the planet."); /* Display the data */ printf("Star Trek Episode %i\n",episode->number); printf("\"%s\"\n",episode->name); printf("Description: %s\n",episode->description); }