A note on this translation
The Korean edition is the original. This English edition is translated from it chapter by chapter, and chapter numbers are kept identical to the original, so a cross-reference to “chapter 62” means the same chapter in both editions. All 13 parts, 105 chapters, appendices A–Q and the index are now translated.
The two editions are kept in step mechanically: scripts/sync-status.py records the hash of the Korean source each translated file was made from, and every build reports any chapter whose original has changed since, so a change on one side surfaces as a stale entry on the other. scripts/check-xrefs.py compares the chapter cross-references of the two editions and reports any that have drifted apart. Per-chapter status is in TRANSLATION.md in the repository.
The Korean edition is at:
- Web — rubidus-api.github.io/proven_c_book/ko/
- PDF — the
koasset of the current release
Contents
Part I — Ground: the machine and its memory
1. Setting the scene2. A simple model of the machine — the birth of C3. Words and addresses — the archetype of C4. Special knowledge about addresses — address 0, alignment, low bits5. The regions of memory — where a program puts what
Part II — What the machine really is: representation and execution
6. Representing integers — sign, overflow, shift7. Representing numbers — the contract called IEEE 7548. Characters and text — scars in the standard9. The origin of streams — punched cards, line printers, printing terminals10. Programs and processes — what it is to be run11. Multitasking and interrupts — a machine taking turns12. Memory divides — registers, caches, a ladder of layers13. The machinery of speed — the birth of the standard14. Compiler optimisation — the abstract machine15. And so C is an abstract language
Part III — The first program
16. Hello world17. The general shape of compilation18. Setting up a development environment19. The compiler landscape — C compilers in active service
Part IV — A minimal toolbox
20. The structure of a program21. Expressions and constants — the things that become values22. Using functions — how to call23. Output
Part V — Declarations: how names are made
24. Declaring variables25. Declaring and defining functions26. Input
Part VI — Values and flow
27. The families of types — how the standard divides them28. Integers — a world of finite numbers29. Integer operations — division, bits30. Implicit conversions — promotion and the usual arithmetic conversions31. Booleans and comparison32. Deciding — if and switch33. Repetition — loops and invariants34. The meaning of a function — copying values and side effects35. Assignment and side effects
Part VII — Memory
36. Objects, addresses, pointers37. Null — the three siblings, formally38. The rules of pointers — alignment and provenance39. Arrays40. Multidimensional arrays41. Arrays and pointers — when they are the same and when they are not42. Loop techniques — nesting, escaping, and making a block43. Strings44. Safe input — blocking overflow, handling failure45. Lifetime and storage duration46. Dynamic memory
Part VIII — The shape of data
47. Structs48. Using structs — temporary values, named arguments, layout49. Unions and representation
Part IX — Deep corners
50. Expressions and operators51. Working with bits — idioms and traps52. Real numbers — the mathematics of approximation53. Errors and contracts54. Undefined behaviour
Part X — Structure
55. The three faces of main — entry point and exit status56. Building out of several files — translation units and linkage57. Linking and the ABI — promises at the binary level58. Where a name may be used — scope59. The world of names — four name spaces and three axes60. Handling name collisions — from prefixes to namespace61. The preprocessor and the translation phases62. Declarations and call expressions — inside the act of calling63. Variadic functions64. Functions as values — the function pointer65. How to read a declaration — two readings and typedef66. The terrain of the standard library
Part XI — Reading the standard library
67. The standard library at a glance68. Streams in reality — <stdio.h> ①69. The traps of reading and writing — <stdio.h> ②70. Strings and memory — <string.h>71. The drawer of odds and ends — <stdlib.h>72. Character classification — <ctype.h>73. Locales ① — a program’s regional settings74. Locales ② — numbers, money, time and sorting75. Wide characters ① — wchar_t and multibyte conversion76. Wide characters ② — the platforms, and wide I/O77. In practice — handling Unicode and multibyte encodings78. Numbers — <math.h>, <fenv.h>, <tgmath.h>79. Time — <time.h>80. Diagnosis and control — <errno.h>, <assert.h>, <signal.h>, <setjmp.h>81. Signals — <signal.h>82. Non-local jumps — <setjmp.h>83. What the new standards added, and the *_s controversy84. Running in separate strands — <threads.h>85. Operations that do not split — <stdatomic.h>86. How to ask about overflow — <stdckdint.h>87. From macro to keyword — bool, nullptr and their companions88. A program’s memory layout — operating systems and embedded89. Inside the allocator — the heap, alternative allocators, alternative standard libraries
Part XII — proven — a new, stable foundation
90. The five bugs shipped for fifty years91. What proven is — and getting started92. Errors are values93. The foundation — bytes, views, and arithmetic that does not overflow94. Allocation is a parameter95. Strings and text96. Formatting and parsing — not writing the type twice97. Containers and algorithms98. The outside world — files, streams, time, random numbers99. The boundaries — running things overlapped, and when there is no OS100. Writing it three times — a tiny JSON
Part XIII — Closing
101. C in practice — tools, projects, and territories102. Build and test — how a project is put together by many hands103. How the work turns — vocabulary and procedure104. The embedded toolbox — compilers and the tools beside them105. Modern C, gathered up