Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/prog/ Challenge #9002

Name: Anonymous 2011-05-02 20:12

The task:

Print strings from "a" to "zzzzz" without using any loop or conditional statements. Don't just write all 1000 permutations out by hand. The output should look like this:
a
b
c
...
aa
ab
ac
...
zzzzx
zzzzy
zzzzz


inb4 lipthfags and dead dogs using some obscure functionality of their obscure languages.

Name: Anonymous 2011-05-03 6:55

>>21
By connecting SIGFPE to an exit function and dividing some dummy volatile value with ('z' - c0) + ('z' - c1) + ('z' - c2) + ('z' - c3) + ('z' - c4), you could make it terminate at the right time.

Name: Anonymous 2011-05-03 7:17

>>21

goto is a loop.

Name: Anonymous 2011-05-03 8:07

>>25
Recursion on main() will generate a call in asm.

If you want to make it not crash, do what >>24 did in his recursive function.

Name: Anonymous 2011-05-04 13:23

>>25
You can install a signal handler. I wrote an example in the other thread.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List