Yes it does
but is that increasing the number of elements of the array? That's what I need to do.
This one allocated 10 bytes and makes it as string. which is something similar to array
char *temp = realloc( array, 10 * sizeof *array );
this one expands that a bit more to
And for the same array to allocated 20 more bytes to make array. Thats is how it works. relloc stores the original pointer in a locatoin that was 10bytes and then allocated 20bytes and returns a nw pointer to the new memory location. This is how it works
temp = realloc( array, 20 * sizeof *array );