it is returning the address of last operation done in the accumulator.....
as the last operation is copying to s to it is returning s
you will understand try running this,,...
#include<malloc.h>
char *f()
{char *s=malloc(8);
strcpy(s,"goodbye");
}
main()
{
*f()='A';
printf("%s",f());
}
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
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.