Yes, both the cases are true because in both the cases memory is allocated
outside the functions internal memory. But just want to know why do you need
to return reference of a static variable.
On Tue, Aug 3, 2010 at 7:38 PM, Raj N wrote:
> 1) Can we return a reference to an internal static vari
1) yes, you can return reference to an internal static variable, but instead
of heap it would be on data segment. Also, that reference should be used by
the function defined in the file(I am not sure of it).
2) Yes. we do it all the time.
On Tue, Aug 3, 2010 at 7:38 PM, Raj N wrote:
> 1) Can we
1) Can we return a reference to an internal static variable in a
function ?
2) Can we return a reference to a dynamic variable variable in a
function ?
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algog