Question: #include #include typedef struct { char title(55); char *author; int pages; } Book; typedef struct { int numBooks; Book *books [22]; } Shelf; int main(void)

 #include #include typedef struct { char title(55); char *author; int pages;

#include #include typedef struct { char title(55); char *author; int pages; } Book; typedef struct { int numBooks; Book *books [22]; } Shelf; int main(void) { Shelf bookShelf [11]; Book book; bookShelf [3]. books [7] = {book; //statement(s) added here strcpy(bookShelf [3]. books [7]->author, "Seuss"); Which of the following statements are required to allocate heap memory so that the last statement will make "Seuss" the author of a book in the bookshelf? Select all that are required and don't worry about their order if more that one statement is selected. bookShelf [3].books [7]->author = malloc(sizeof(char) * 50); O bookShelf [3]. books [7] = malloc(sizeof(Book)); bookshelf [3]. books [7] ->author = malloc(sizeof(char)); O bookShelf = malloc(sizeof (Shelf) * 11); bookShelf [3] = malloc(sizeof(Shelf))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!