J
Jerry Coffin
How can you _not_ remove an element from an array?
The ways are manifold and manifest... said:Here is a trivial case:
size_t count = 2;
int * array = (int *)malloc(sizeof(int) * count);
What malloc returns is the address of some storage, but that storage
is NOT an array. While the differences are often negligible, there are
also situations where they become major. Just for an obvious example,
using sizeof on a real array gives you the size of the whole array.
There is no similar capability for storage returned by malloc.