Is `&variable = null;` possible? [closed]

No you can’t. &someVariable is an rvalue. It cannot be assigned to and it is meaningless to try. Furthermore, the very idea of what you are trying to do is meaningless. Function variables are allocated on the stack and are only freed when the function returns. Global variables can’t be freed. Variables within allocated structures … Read more

Can you tell me specific what this program is doing? [closed]

First of all, this line if(!(temp = (double*)realloc(data, capacity*sizeof(double)))) should look like if(!(temp = realloc(data, capacity*sizeof(double)))) because as per this discussion we need not to cast the return value of malloc() and family in C.. That said, to break down the statement, First, temp = realloc(data, capacity*sizeof(double)) gets evaluated. This statement reallocates data to have … Read more