Is this valid in c?
int func()
{
static int *p = NULL;
p = realloc(p, 20);
return 0;
}
I want to use this in recursion so every time the func
function is called if there is already allocated memory it will be reallocated and if there is non(first call) it will be allocated instead.