For C programmers.
How can I know if a pointer char *
, for example, was initialized by using malloc
or realloc
? I mean in kind of that function:
char* func(char** x){
/* need some reallocating of *x but
* *x can be a pointer to const string
*/
}