0
How can i declare an array without initializing its size?
Need it for a program to perform set operations in C.
1 Answer
+ 5
int *array;
pointers and arrays are equivalent. You need a size variable to keep track of how much you got and a malloc call to allocate the array memory. realloc call can add or remove memory as needed. free call to return all of the memory.