[Coco] Oneliners
Dave Kelly
daveekelly at earthlink.net
Mon Sep 19 18:27:21 EDT 2005
johnadonaldson at comcast.net wrote:
> Some mentioned about "OneLiners" the other day. Here is a "C" onliner.
>
> main(a) {a="main(a) {a=%c%s%c;printf(a,34,a,34);}";printf(a,34,a,34);}
>
> John Donaldson
>
Evidently my linux system doesn't like the way you code. I must talk to
it sternly.
Wasn't this exact warning I got in the old 10 commandments of C programming?
SilverNail:~/documents# gcc line1.c
line1.c: In function `main':
line1.c:1: warning: assignment makes integer from pointer without a cast
line1.c:1: warning: passing arg 1 of `printf' makes pointer from integer
without a cast
SilverNail:~/documents# cat line1.c
main(a) {a="main(a) {a=%c%s%c;printf(a,34,a,34);}";printf(a,34,a,34);}
SilverNail:~/documents#
--
.......what good is there in life without hot cornbread?
More information about the Coco
mailing list