I have an array of structs which is dynamically allocated. I would like to add new structs to the end of the array.
The struct defined as
struct book
{
char *id;
char *bookName;
char *authorName;
char *numOfPages;
char *publishingYear;
char *category;
} typedef t_book;
The array defined as
t_book* books= (t_book*)malloc(4*sizeof(t_book));