Skip to content

This repository contains solutions and exercises from "The C Programming Language" by Brian W. Kernighan and Dennis M. Ritchie (K&R).

Notifications You must be signed in to change notification settings

Manuelshub/C-Basics

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The C Programming Language (K&R) Exercises

This repository contains solutions and exercises from "The C Programming Language" by Brian W. Kernighan and Dennis M. Ritchie (K&R).

Structure

The repository is organized as follows:

  • chapter1/ - A Tutorial Introduction
  • chapter2/ - Types, Operators, and Expressions
  • chapter3/ - Control Flow
  • chapter4/ - Functions and Program Structure
  • chapter5/ - Pointers and Arrays
  • chapter6/ - Structures
  • chapter7/ - Input and Output
  • chapter8/ - The UNIX System Interface

Each chapter directory contains:

  • A README.md file describing the chapter's content
  • Exercise directories (e.g., ex1-1/, ex1-2/, etc.) containing the solutions
  • Each exercise directory contains:
    • solution.c - The solution code
    • README.md - Description of the exercise

How to Use

  1. Navigate to the chapter you're interested in
  2. Find the exercise you want to work on
  3. Each exercise directory contains both the problem description and solution

Compilation

To compile any solution, use:

gcc solution.c -o solution

Running

After compilation, run the program:

./solution

About

This repository contains solutions and exercises from "The C Programming Language" by Brian W. Kernighan and Dennis M. Ritchie (K&R).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%