Skip to content
项目

ohkimur/the-c-programming-language-2nd-edition-solutions

在 GitHub 查看

关于

《C 程序设计语言》(第 2 版)习题解答,作者为 Brian W. Kernighan 和 Dennis M. Ritchie。这本书也简称为 K&R。

编程语言与运行时

这些数字如何统计

实测星标增长

24小时
+1
7天
+1
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

The C Programming Language 2nd Edition - Solutions

C/C++ CI

Solutions to exercises from The C Programming Language (2nd Edition) by Brian W. Kernighan and Dennis M. Ritchie, commonly known as K&R.

Getting Started

Prerequisites

You need a C compiler:

macOS:

xcode-select --install

Ubuntu / Debian:

sudo apt-get update && sudo apt-get install build-essential

Windows: Use WSL (recommended) or MinGW.

Building

Build all exercises:

make

Build a specific exercise:

cd chapter_1/exercise_1_01
make hello_world
./hello_world

Clean up:

make clean

Repository Structure

chapter_N/
  exercise_N_XX/
    solution.c      # Solution source code
    file_in.txt     # Input file (if needed)
    file_out.txt    # Output file (if needed)

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Quick start:

make format   # Format your code
make check    # Run all checks before submitting

About the Book

The C Programming Language is a classic programming book. The exercises are designed so that you can solve them with the knowledge acquired up to that point in the book.

These solutions are meant to help those learning C. If you're working through the book, try solving the exercises yourself first!

Tools

License

This project is open source. Feel free to use these solutions for learning!

探索相关项目

加载中…