C Programming Puzzles & Exercises
Looking to hone your C programming skills? Are you just learning to program and need to find an area where you need to improve? Completing some C programming exercises is an awesome way to become a better programmer!
Doing some of these challenges can help you learn more about the C language, improve problem-solving skills, and master new coding techniques.
Finding programming exercises can be difficult, so I created this guide to C programming exercises. Here is a growing list of places where you can brush up on your programming skills (and to learn new ones.)
Wikibooks C Exercises
If you're new to programming in C, Wikibooks has a page full of quizzes on a wide number of features within the C programming language.
The site starts out by quizzing you on their material and then moves on to questions that require you to write a specific program. Each question contains a link to an answer so you can see whether or not you are correct.
You can visit their C Programming Beginning Exercises page to get started.
USA Computing Olympiad Programming Contest
The USA Computing Olympiad Programming Contest site not only hosts a programming contest but also offers a large amount of training. Whether or not you're interested in the contest, you can make use of their preparation material.
You will be required to register at the gateway before viewing the content. The site is language agnostic, so if the C programming language really isn't your thing (or you'd like to learn another language), you'll still be able to enjoy this resource.
Topcoder is one of the most popular sites offering programming challenges and exercises. While it's another competitive programming community, it's great for improving programming skills independently.
Project Euler is an incredibly popular site for those interested in programming puzzles.
This site allows users to submit answers to problems in a number of programming languages including C.
Word of warning: Project Euler is for those who really know math, so if math isn't your strong suit, you may want to look elsewhere.
UVa Online Judge
UVa Online Judge has hundreds of problems similar to those used in programming contests. You can do these exercises at your own leisure in a wide number of languages.
The site also runs contests from time to time for those interested in participating in coding competitions.
Sphere Online Judge (SPOJ)
SPOJ is essentially a large database of programming problems in a variety of languages.
Here, you can select your preferred programming language and check out exercises to solve in that particular language. The above link will take you to their index of C programming exercises.
Exercises from "The C Programming Language"
The C Programming Language Exercises website maintains a list of exercises from the book, "The C Programming Language."
In order to view the exercises, navigate down to the area that says "solutions" and select a chapter. The next page will show each exercise as well as a link to its solution.
The C Puzzle Book
If you're looking for a book full of exercises, I recommend "The C Puzzle Book." It's chock full of problems written with the C programming language in mind. It's written so that the output of the program is actually the solution so that you can quickly and easily see if you're correct.
The book covers topics from a variety of angles giving readers a full look at syntax and semantics to give readers a full understanding of the language.
© 2012 Melanie Shebel