[Fwd: Re: [linux-support]Für C-Programmierer :o)]

Marco Steinacher mailinglists at websource.ch
Fri Oct 8 11:43:40 CEST 2004


michel wrote:

> have_fun.c ist nicht gross, macht nicht viel, ist vermutlich nicht
> ganz einfach zu verstehen.
> $ more have_fun.c
> main() { printf(&unix["\021%six\012\0"],(unix)["have"]+"fun"-0x60);}
> $ ./have_fun.out
> unix
> 
> Erklärung??

#define unix 1

n["string"] ist gleich (n)["string] ist gleich "string"[n] ist gleich 
char* str="string"; str[n]

'a' ist gleich 0x61

"string"+n ist gleich char* str="string"; str+n

\012 ist gleich "\n"

Damit sollte eigentlich alles klar sein, oder?

Gruss Marco
-- 
WebSource Internet Services - www.websource.ch
Kontakt/PGP-Keys: www.websource.ch/kontakt
PGP: 0x0B431D6B - 0BCA FD08 2859 FF1A 4B42 29BD DD91 3A67 0B43 1D6B


More information about the Linux-support mailing list