This is a repository for codes from the text and solutions to the exercises of the following book, which is also known as K&R
.
- B. W. Kernighan, and D. M. Ritchie, The C Programming Language, 2nd Edition, Prentice Hall, 1988.
Here is a short version of the table of contents, containing the title of the chapters.
- Chpater 1. A Tutorial Introduction
- Chapter 2. Types, Operators, and Expressions
- Chapter 3. Control Flow
- Chapter 4. Functions and Program Structure
- Chapter 5. Pointers and Arrays
- Chapter 6. Structures
- Chapter 7. Input and Output
- Chapter 8. The UNIX System Interface
- Appendix A. Reference Manual
- Appendix B. Standard Library
- Appendix C. Summary of Changes
As the publishing year of the book suggests, it follows the C89 standards. However, we may use some new features of the C99 or C11 within the codes, which are supported by all modern compilers. You can take a look at this wikipedia page for a brief history of the C standards. All of the codes were tested with the gcc
compiler.