Learn C the Hard Way: Practical Exercises on the Computational Subjects You Keep Avoiding (Like C)

Zed A. Shaw  
Total pages
September 2015
Related Titles

Product detail

Product Price CHF Available  
Learn C the Hard Way: Practical Exercises on the Computational Subjects You Keep Avoiding (Like C)
43.60 approx. 7-9 days


Forget old-fashioned C programming books that assume the reader is a computer hardware expert and teach frustrating, old-fashioned coding styles. If your students know any language at all, Zed A. Shaw's Learn C the Hard Way can help them get started fast with modern C programming. This book/CD package is called 'The Hard Way,' but it's really quite easy: it just requires discipline, practice, and persistence. Shaw teaches how to write modern, clean, clear C code through dozens of brilliantly-crafted exercises, most on two pages. Shaw offers plenty of extra help through 5+ full hours of CD-based teaching video. Nothing important comes without discipline, practice, and persistence.


  • By top blogger and outstanding teacher Zed Shaw
  • CD contains 5+ hours of teaching video
  • Refined through Shaw's years of instructional work online, where he attracts thousands of visitors per day: an older online version of this book earned 500K+ downloads

Table of Contents

  • Exercise 0: The Setup           
  • Exercise 1: Dust Off That Compiler          
  • Exercise 2: Using Makefiles to Build          
  • Exercise 3: Formatted Printing          
  • Exercise 4: Using a Debugger         
  • Exercise 5: Memorizing C Operators         
  • Exercise 6: Memorizing C Syntax           
  • Exercise 7: Variables and Types             
  • Exercise 8: If, Else-If, Else           
  • Exercise 9: While-Loop and Boolean Expressions          
  • Exercise 10: Switch Statements          
  • Exercise 11: Arrays and Strings           
  • Exercise 12: Sizes and Arrays           
  • Exercise 13: For-Loops and Arrays of Strings          
  • Exercise 14: Writing and Using Functions             
  • Exercise 15: Pointers, Dreaded Pointers          
  • Exercise 16: Structs and Pointers to Them            
  • Exercise 17: Heap and Stack Memory Allocation          
  • Exercise 18: Pointers to Functions              
  • Exercise 19: Zed’s Awesome Debug Macros          
  • Exercise 20: Advanced Debugging Techniques            
  • Exercise 21: Advanced Data Types and Flow Control           
  • Exercise 22: The Stack, Scope, and Globals            
  • Exercise 23: Meet Duff’s Device           
  • Exercise 24: Input, Output, Files          
  • Exercise 25: Variable Argument Functions           
  • Exercise 26: Project logfind           
  • Exercise 27: Creative and Defensive Programming           
  • Exercise 28: Intermediate Makefiles           
  • Exercise 29: Libraries and Linking       &


Zed Shaw is an avid guitar player, programmer, and writer whose books teach people all over the world how to write software. His books Learn Python the Hard Way and Learn Ruby the Hard Way (both now in their third editions) have been read by millions of people around the world. His software has been used by many large and small companies. His essays are often quoted and read by members of many geek communities. An entertaining and lively writer, he will keep you laughing and make you think.