B
B. Gandhi
Hi friends
I have a query regarding memory allocation deallocation in C.
It is as follows:
char *path = getenv("PATH");
In this call to getenv(), where does the returned string stored?
is it on heap or stack?
and do I need to make a call like free(path) when there is
no need for path anymore?
Thanks in advance for ur help..
Regards
Bhavin
I have a query regarding memory allocation deallocation in C.
It is as follows:
char *path = getenv("PATH");
In this call to getenv(), where does the returned string stored?
is it on heap or stack?
and do I need to make a call like free(path) when there is
no need for path anymore?
Thanks in advance for ur help..
Regards
Bhavin