Skip to content

igorktech/kr.c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K&R C Programming Solutions

Welcome to my repository of solutions for the exercises from "The C Programming Language" by Brian W. Kernighan and Dennis M. Ritchie. This book is a classic and fundamental resource for learning the C programming language.

Table of Contents

Introduction

This repository contains my personal solutions to the exercises from the second edition of "The C Programming Language" by K&R. Each solution is implemented in C and organized by chapter.subchapter number.

Repository Structure

Each chapter directory contains the corresponding exercise solutions in separate .c files.

How to Use

To compile and run the solutions, you need a C compiler such as gcc. Below are the steps to compile and run a specific exercise:

  1. Navigate to the directory containing the exercise:

    cd ch1.10
    
  2. Compile the exercise using gcc:

    gcc -o ex1.20 ex1.20.c
  3. Run the compiled program:

    ./ex1.20

Feel free to modify and experiment with the code to better understand the concepts.

Exercises

This repository covers exercises from all chapters of the book:

  • Chapter 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

Contributing

If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. Contributions are welcome!

Steps to Contribute

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Commit your changes.
  4. Push your branch and create a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.


Happy coding and learning!

About

K&R solutions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages