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

Generating alphanumeric gibberish?

Name: Anonymous 2010-01-12 14:58

What's a simple (preferably loopless) way to generate a large amount of alphanumeric gibberish? Any language is acceptable.

In PHP, I thought this would be perfect:

hexdec(mt_rand(1.e999999999, 1.e9999999999));

But it doesn't work due to restrictions on the length of int. :(

Name: Anonymous 2010-01-16 2:32

>>26
does that work?

i'm just learning c, but it seems to me that you'd be running out of the bounds of your gibberish array in the first for loop. that's ok?

also, why not just

printf("%c", characters[rand() % 54]);

or

for (int x = 0; x < = 300; ++x) {
    gibberish[0] = characters[rand() % 54];
    print("%c", gibberish[0]);
}


?

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