I've been looking through my old programming books and found an old gem from when I was first learning C called The C Puzzle Book. I highly recommend this book as it really challenges you on the basics of the language, and should you be unable to solve a puzzle, more than half of the book is dedicated to line-by-line analysis of all of the puzzles contained within.

Here's a sample puzzle from the book that I'm sure some of you budding C programmers will have fun with: http://www.eng.auburn.edu/cse/classes/cse350/carlisle/cse350/O11/swamp.html

Also, feel free to post more interesting C puzzles you come up with.
Stuff like this is what I both love and hate about C. Neat find, maybe I'll check it out.
That is cool Very Happy I tried that puzzle, and the one located in the same directory as the sample on you gave ( http://www.eng.auburn.edu/cse/classes/cse350/carlisle/cse350/O11/ifexam.html ). Granted, I got them both wrong (parts were right, but parts were also wrong). I had to get Tari to explain what the continue's and break's did in a switch() statement. I'd love to try more puzzles if anyone posts them Smile
I think I have answers to the questions that Ultimate Dev'r and _player posted, but I would like to double-check. Where did you guys find the answers?
KermMartian wrote:
I think I have answers to the questions that Ultimate Dev'r and _player posted, but I would like to double-check. Where did you guys find the answers?


The answer to the switch puzzle is
SWITCH SWAMP

The answer to the "if" puzzle is
x = 5
x = 5
x = 1
x = 7 z = 0
x = 3 z = 0
x = 3 z = 1
KermMartian wrote:
I think I have answers to the questions that Ultimate Dev'r and _player posted, but I would like to double-check. Where did you guys find the answers?


Uh, copy/paste the code into a file, compile it, and run it. Instant answer.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement