[Solved] Allocate memory on pointed pointer to char
This answer is based on the assumption that you do proper handling of your pointers between the part where you allocate memory for 1 element each and where you try to reallocate the memory. This part // realloc to correct…