It's been a long time since I programmed anything in c++, but dwin passed me this question and I just couldn't resist the challenge.
http://www.comp.nus.edu.sg/~cs1101cl/lab4/oddweek/Ok, I know the question asked for c but I'm not too familiar with that so I used c++. Just downloaded the dev c++ IDE. I don't really like it, it's small but the text editing is very manual, it doesn't even indent my lines properly. Spent the whole afternoon working on the question and finally managed to solve it, haha.
This is unrelated, but anyway, I saw an article last week which mentioned something about search engines. It mentioned that in 2002, graduate students at Tel Aviv University were asked to find on the web, with no time limit, a picture of the Mona Lisa, the complete text of either Robinson Crusoe or David Copperfield and a recipe for apple pie accompanied by a photograph. Only 15% succeeded at all 3 tasks.
I had a go at it. The Robinson Crusoe text was the hardest to find. The first link didn't seem to work, so I had to go a bit further down, but the other 2 showed up very quickly on google. Maybe it's 2006 and there's more content on the web now, so the stuff was easier to find as compared to 2002. Have a go, it shouldn't be too difficult.