The C Programming Language

Copyright

C is an important, foundational language. The C Programming Language, by Brian W. Kernighan and Dennis M. Ritchie, describes the language from which many top programming languages are derived. With its curly braces and structured methods, it introduces an easy-to-maintain and also efficient way of writing programs. This book provides a practical overview of C.

This page reviews the book C Programming Language by Brian W. Kernighan and Dennis M. Ritchie.

Introduction

Question and answer

If you are not going to actually write C code, what point is there to studying the C language? Isn't it just a remnant of days past, or used in low-level software? What I found is that, separate from the C language itself, some of the ideas and approaches to coding are still very relevant.

C is not a big language, and it is not well served by a big book. Page IX

Optimization

Performance optimization

For example, the book uses an algorithm to convert a string to an integer as an example of a for-loop. On page 43, we see the atoi() function. With multiplication and subtraction, we can convert a string into its numeric equivalent in a single pass. Interestingly, this implementation is over 50 times faster than the .NET parsing methods.

int.Parse Optimization

Imperative coding

Collection abstraction

The C language teaches us to use an imperative programming style. Statements have an effect on the environment of the program; we express what we want to happen with combinations of commands, one after another. The book does not take a high-level approach to programming, but it is also not low-level.

Summary

The C Programming Language takes us on a walkthrough of all the features of C. If you do not have enough time to actually program C, this book can give you a good idea of how it would be done. Actually writing C programs and using trial and error to improve them is key to learning the language, but this book still has use in the areas of optimization and how to approach functions in an imperative way.

Amazon page Books About Programming
.NET