Passing a pointer across functions does not create any problem and doesn't 
cause memory leak. but passing an array ,for eg

int *fun()
{
int a[12];
return a;
}

this creates memory leak as the call stack no more holds the array. So, in 
essence, though int *a and int a[]  behave quite similarly on 
many occasions, subtle differences do occur bw the two

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/wvABGZ6uAH0J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to