I have a buffer and want to do a test to see if the buffer has sufficient capacity I.e. find number of elements I can add to the buffer.
char *buffer = (char *)malloc(sizeof(char) * 10);
Doing a
int numElements = sizeof(buffer);
does not return 10, any ideas on how I can accomplish this?