"Dick de Boer" <ddeboer - dsp.com> writes:
"SinC" <ch*********@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com... Here is the program code:
Can somebody tell me, what is going on here in this whole code?
Thanks.
z in function ID is allocated on stack. The return adres pushed when calling
id() is also on stack. It seems that &z + 2 adrresses the reurun adres of
the calling function. Here, character x is written. After that the result
depends strongly on implementation of the stackframe.
It depends strongly on the implementation long before that. There's
no guarantee that there's such a thing as a "stack" or a "stackframe",
or that the return address (if any) is stored somewhere in it.
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.