First output of memory location is fine.
Second output is also expected one.
Third output will vary compiler to compiler and from time to time.
This is because a[] is a local to fun(). First time when you call
printf("%d\n",r[0]) its fine. but after executing printf() location of r is
lost and hence you'll get different output is undefined.
--
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/-/gzaXX7gzytAJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.