sorcerer_see: (Default)
PS I synthesize here in my own words what K&R teach, re-write all their example programs, character by character, solve all the C exercises they hand out. I comment to what K&R teach cursively. I do not copy-paste anything from the book! In regards to the percentages listed: books often have prefaces with Roman numbers and often also lengthy Appendices. In my calculation I include all pages that I effectively study and synthesize.

TCPL 2Ed - Page 002 to 004 - 3.01% Completion

The new function declarations fit into the shift toward more discipline. Compilers will warn in case of type errors but will not automatically convert incompatible types.

C retains the vision that C programmers know what they are doing and so the language should not 'try to protect them for their own good'. It just requires that programmers declare their intentions explicitly.

C is obviously not perfect. Some operators have the wrong precedence and the syntax is not always the best. Regardless these blemishes, C has proven to be effective and expressive for a large variety of applications.

Overall structure of the book:

Chapter 1
Tutorial to the central concepts of C
To get the reader going with programming C as fast as possible, because we think writing programs is the best way to learn programming.
Learners do need to have some notion of the basics of programming, because there is no ecplanation of what computers are, or what compilers do, or basic expressions etc.

Although the book gives example of good programming methods, it's purpose is not to be complete reference of data structures and algorithms in general. It focuses on the C language in particular.

Chapter 2 - 6
These chapters go deeper into the details but still uses complete programs to teach, and not fragments.
Chapter 2
- data types
 -operators
- expressions
Chapter 3
- control flow
- if/else
- switch
- while
- for
Chapter 4
- functions
- program structure-external variables
- scope rules
- multiple source files
- preprocessor
Chapter 5
- pointers
- address arithmetic
Chapter 6
- structures and unions

Chapter 7
- standard library, which serves as an interface to the OS
This library is explained by the ANSI C standard and should be compatible for every machine that is compatible with C. Programs that use this library can be moved up and forth among almost all platforms without any changes being needed.

Chapter 8 
Is specifically about the interface used between C and the OS on Unix systems. (Not sure yet  in how far this will translate to modern Linux OSes.) The book says that this chapter might still be useful to users of other systems since it shows how the standard library is connected to one case scenario of a particular OS.

Appendix A
Contains a C reference manual, which aligns with the C ANSI standard. The difference being that the latter is meant for compiler devs while this one is meant for learners studying C. It is more concise and less legalistic.

Appendix B
An overview of the contents of the Standard Library: for users rather than implementers.

Appendix C
This is an overview of all the changes between the C language as presented in the 1978 !Ed of K&R's TCPL. However, K&R say: the final judge will be your own C compiler.


Profile

sorcerer_see: (Default)
sorcerer_see

October 2025

S M T W T F S
    12 34
56 7 8 9 10 11
12 1314 15 16 1718
19 2021 22 23 2425
2627 28293031 

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 16th, 2026 11:59 am
Powered by Dreamwidth Studios