GDB is an immensely useful tool to help you debug your C programs. It lets you insert breakpoints into your programs so that you can stop execution and examine the contents of memory and registers. It also supports single-stepping your program one line of source code at a time. It leads to much more productive debugging than just using printf. The time you spend getting familiar with GDB will be an excellent investment.
A handy dandy guide to the most commonly used GDB commands. Useful to have open while you watch the video and work on the examples below.
This very useful video shows you how to get started with GDB.
Looking for more details? Take a look at this extensive tutorial thanks to Norman Matloff at UC Davis.
Here are two examples for playing with GDB with some example commands you can try: