Keith M wrote:
On 10/13/2011 2:08 AM, Pontus Pihlgren wrote:
Do you have a favourite c construct? Do share!
(even ioccc entries
allowed)
While it is more trivia than anything else:
A man with more than one window open, say browser and C editor,
accidentally pastes a URL into the white space in the middle of his C
source code. The source code previously compiled fine.
He goes to recompile it, what happens?
Does it compile? Why or why not?
I think it depends. On whitespace on a line all by itself, it should work.
But if the whitespace is within a statement or function call then it could
fail if code ends up commented out, e.g.
printf("hello\n" );
... paste a URL into that and the compiler will get confused :-)
Aside: I recall encountering one C compiler which didn't handle nested
comments - if you had a "/*"-style comment within a "//"-style one,
it'd
barf. I think it may have been an early (I mean, 1990s) version of gcc.
Creating a file called "*foo.html" and then accessing it via firefox and
apache as "http://localhost/*foo.html" works, although I'm not sure if
it's
technically a legal URL or not :-)
cheers
Jules