nagendra4u
Programmer
What is the scope of the memory allocated by either of Malloc or Realloc?
I mean if in a function i allocate some memory using Malloc/Realloc, can I use the same memory location using a pointer from some other fucntion?
In specific, there is CHAR pointer defined in function A. I call function B and pass this CHAR pointer to it. In function B i allocate some memory to this pointer. Will this allocated memory be accessible from function A?
Cheers
Nagu
I mean if in a function i allocate some memory using Malloc/Realloc, can I use the same memory location using a pointer from some other fucntion?
In specific, there is CHAR pointer defined in function A. I call function B and pass this CHAR pointer to it. In function B i allocate some memory to this pointer. Will this allocated memory be accessible from function A?
Cheers
Nagu