When I'm
bored, I often think of ways to write new
inefficient "Hello, world!"
programs. These are some
methods I've come up with:
Making the
program go through the
characters of the
string "Hello, world!" one by one, generating
random characters until it comes up with the correct one, then
displaying it.
strcat()'ing many short
strings containing parts of the string "Hello, world!"
Using many
#define's, I've made a
hello world program where the only
code that wasn't
preprocessor directives was "q
foo lal
lol rod b n s 19 y x n g r w r x a lal n
lol x
bar l x
rofl".
Writing "Hello, world!" to a
file, then using
system() to
display the
text in the file using
cat.
Transferring "Hello, world!"
character by character through a local
TCP/IP socket connection, displaying each character as it is received.
Using a separate
thread to display each character in the
string "Hello, world!"
And possibly some others that I've forgotten.