I\'m a bit new to malloc and C in general. I wanted to know how I can, if needed, extend the size of an otherwise fixed-size array with malloc.
Example:
a) you did not use malloc to create it so you cannot expand with malloc. Do:
mystruct *myarray = (mystruct*)malloc(sizeof( mystruct) *SIZE);
b) use realloc (RTM) to make it bigger