Jul. 28th, 2004

Geek Alert

Jul. 28th, 2004 10:26 pm
petermarcus: (Default)
Best. Quiz. Ever.

You are... C!
#define MAXBEER (99)

                       void chug(int beers);

                       main()
                       {
                       register beers;

                       for(beers = MAXBEER; beers; chug(beers--))
                         puts("");

                       puts("\nTime to buy more beer!\n");

                       exit(0);
                       }

                       void chug(register beers)
                       {
                       char howmany[8], *s;

                       s = beers != 1 ? "s" : "";
                       printf("%d bottle%s of beer on the wall,\n", beers, s);
                       printf("%d bottle%s of beeeeer . . . ,\n", beers, s);
                       printf("Take one down, pass it around,\n");

                       if(--beers) sprintf(howmany, "%d", beers); else strcpy(howmany, "No more");
                       s = beers != 1 ? "s" : "";
                       printf("%s bottle%s of beer on the wall.\n", howmany, s);
                       }



What programming language are you?


It's so true, too -- I adore C. My language of choice. Who cares about garbage collection and exception handling? !i.


-------


In other news, my spur-of-the-moment lifestyle lately has become even more spur-of-the-moment...and it's delicious.

Profile

petermarcus: (Default)
petermarcus

January 2012

S M T W T F S
12 34567
891011121314
15161718192021
22232425262728
293031    

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 27th, 2025 01:13 am
Powered by Dreamwidth Studios