Practical Exercises on the Computational Subjects You Keep Avoiding
Zed A. Shaw
C#
Hard#
_Way#
You Will Learn C!
Zed Shaw has crafted the perfect course for the beginning C programmer eager to advance their skills in any language. Follow it and you will learn the many skills early and junior programmers need to succeed–just like the hundreds of thousands of programmers Zed has taught to date! You bring discipline, commitment, persistence, and experience with any programming language; the author supplies everything else.
In Learn C the Hard Way, you’ll learn C by working through 52 brilliantly crafted exercises. Watch Zed Shaw’s teaching video and read the exercise. Type his code precisely. (No copying and pasting!) Fix your mistakes. Watch the programs run. As you do, you’ll learn what good, modern C programs look like; how to think more effectively about code; and how to find and fix mistakes far more efficiently. Most importantly, you’ll master rigorous defensive programming techniques, so you can use any language to create software that protects itself from malicious activity and defects.
Through practical projects you’ll apply what you learn to build confidence in your new skills. Shaw teaches the key skills you need to start writing excellent C software, including
It’ll Be Hard at First. But Soon, You’ll Just Get It–And That Will Feel Great!
This tutorial will reward you for every minute you put into it. Soon, you’ll know one of the world’s most powerful programming languages. You’ll be a C programmer.
Watch Zed, too! The accompanying DVD contains 5+ hours of passionate, powerful teaching: a complete C video course! If you purchase the digital edition, be sure to read "Where Are the Companion Content Files" at the end of the eBook to learn how to access the videos.
Table of Contents
0 The setup
1 Dust off that compiler
2 Using makefiles to build
3 Formatted printing
4 Using a debugger
5 Memorizing C operators
6 Memorizing C syntax
7 Variables and types
8 If, else-if, else
9 While-loop and boolean expressions
10 Switch statements
11 Arrays and strings
12 Sizes and arrays
13 For-loops and arrays of strings
14 Writing and using functions
15 Pointers, dreaded pointers
16 Structs and pointers to them
17 Heap and stack memory allocation
18 Pointers to functions
19 Zed's awesome debug macros
20 Advanced debugging techniques
21 Advanced data types and flow control
22 The stack, scope, and globals
23 Meet Duff's device
24 Input, output, files
25 Variable argument functions
26 Project logfind
27 Creative and defensive programming
28 Intermediate makefiles
29 Libraries and linking
30 Automated testing
31 Common undefined behavior
32 Double linked lists
33 Linked list algorithms
34 Dynamic array
35 Sorting and searching
36 Safer strings
37 Hashmaps
38 Hashmap algorithms
39 String algorithms
40 Binary search trees
41 Project devpkg
42 Stacks and queues
43 A simple statistics engine
44 Ring buffer
45 A simple TCP/IP client
46 Ternary search tree
47 A fast URL router
48 A simple network server
49 A statistics server
50 Routing the statistics
51 Storing the statistics
52 Hacking and improving your server
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.