Here is a C puzzle I(PCE) got from Bestin:
You have a magical program `a.c'. When you type `cc a.c', your compiler appears to hang (ie, you don't get back the prompt). Now,during this time, you will be able to type any program `b.c' in the standard input and type Ctrl-D. Once you do this, you get back the prompt. Now, you type `a.out' and magic, what you get will be the output of program `b.c'! Question is, what is this program `a.c'?
July 2005 August 2005 October 2005 December 2005 March 2006 June 2006 July 2006 December 2006 February 2007 June 2007 March 2010 May 2010
Subscribe to Posts [Atom]