All Projects → ohkimur → the-c-programming-language-2nd-edition-solutions

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

Licence: MIT license
Solutions to the exercises in the book "The C Programming Language" (2nd edition) by Brian W. Kernighan and Dennis M. Ritchie. This book is also referred to as K&R.

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to the-c-programming-language-2nd-edition-solutions

nerdojo
🥋 Coding Dojo é uma forma de treinar suas habilidades em desenvolvimento de sistemas. Usamos o formato KATA. Nesse formato vamos apresentar o desafio e apresentar a proposta de solução (sem mostrar o código), e reunir as pessoas em equipes. Esse repositório serve como uma central de tudo o que acontece no NCD. Fique por dentro!
Stars: ✭ 36 (-85.31%)
Mutual labels:  programming, programming-exercises, programming-challenges
framework
Solu Framework is a full featured, ORM-backed, isomorphic framework using RPython, Pouch/CouchDB and React.
Stars: ✭ 20 (-91.84%)
Mutual labels:  solutions, solution
dsge
Course on Dynamic Stochastic General Equilibrium (DSGE): Models, Solution, Estimation (graduate level)
Stars: ✭ 41 (-83.27%)
Mutual labels:  solutions, solution
introcsharpbook
"Fundamentals of Computer Programming with C#" Book
Stars: ✭ 12 (-95.1%)
Mutual labels:  programming, programming-exercises
NLP-Specialization
NLP Specialization (Natural Language Processing) made by deeplearning.ai
Stars: ✭ 44 (-82.04%)
Mutual labels:  solutions, solution
Algorithm-Implementations
Lots of algorithm's & their implementations that have been compiled from a variety of locations.
Stars: ✭ 15 (-93.88%)
Mutual labels:  programming-exercises, programming-challenges
python-tutorial-for-beginners
Python Tutorial for Beginners with 500 Code Examples
Stars: ✭ 167 (-31.84%)
Mutual labels:  programming, programming-exercises
30-seconds-of-c
🔌Curated collection of useful C Programming tutorials, snippets, and projects that you can understand in 30 seconds or less.
Stars: ✭ 29 (-88.16%)
Mutual labels:  c-language, c-programming
landscape-of-programming
This repo aim to show you what to learn on the way to excellence.
Stars: ✭ 67 (-72.65%)
Mutual labels:  programming, solutions
Competitive-Programming-Codes
Includes codes from coding competitions and contests over the internet. Languages:- Python3 and C++
Stars: ✭ 14 (-94.29%)
Mutual labels:  programming, solutions
python-workouts
Quick Reference for Python
Stars: ✭ 24 (-90.2%)
Mutual labels:  programming, programming-exercises
LeetCode
LeetCode Problems
Stars: ✭ 41 (-83.27%)
Mutual labels:  programming-exercises, programming-challenges
C-Programming
C Programming Experiments
Stars: ✭ 25 (-89.8%)
Mutual labels:  c-language, c-programming
Prime-Python
이 저장소는 생능출판사의 "으뜸 파이썬"을 기반으로 합니다.
Stars: ✭ 18 (-92.65%)
Mutual labels:  programming, programming-exercises
CS-97SI
Solutions to "CS 97SI: Introduction to Competitive Programming Contests" by Stanford University
Stars: ✭ 24 (-90.2%)
Mutual labels:  solutions
CodeWars
Daily Coding Exercises to sharpen problem solving skills
Stars: ✭ 67 (-72.65%)
Mutual labels:  programming-exercises
Cyclops-PRU
Programming framework for the Beaglebone black's Programmable Realtime Unit (PRU)
Stars: ✭ 33 (-86.53%)
Mutual labels:  programming
matlab-novice-inflammation
Programming with MATLAB
Stars: ✭ 26 (-89.39%)
Mutual labels:  programming
NamingThings
Content on tips, tricks, advice, practices for naming things in in software/technology
Stars: ✭ 31 (-87.35%)
Mutual labels:  programming
End-to-End-Machine-Learning-Projects
This repository contains Machine Learning projects that involve the steps starting from data collection to deployment
Stars: ✭ 74 (-69.8%)
Mutual labels:  programming

The C Programming Language 2nd Edition - Solutions

C/C++ CI

Introduction

The C Programming Language is a very popular book and sometimes people refer to it as K&R. The authors Brian W. Kernighan and Dennis M. Ritchie did a very good job of explaining the core concepts of programming. The focus of the book is the C programming language, however, the approach is general, so it can be extrapolated to other programming languages.

Each chapter of the book contains exercises that could be very helpful for a better understanding of the C language. The exercises are designed so that anybody can solve them with the knowledge acquired up to that exercise.

This repository contains the solutions to the exercises from each chapter of the book. These solutions are meant to be helpful for those who want to learn to program with the C language.

Environment

The source code is not tied up to an IDE, so any text editor will do the job. However, there are useful tasks and settings available for Visual Studio Code. For a better experience using this editor, the C/C++ extension provides some very helpful features specific to the C programming language.

Compilers

To be able to write programs in C, a compiler is required. There are many options available for each operating system.

macOS

The Clang compiler is a very nice choice when using macOS. It is available with Xcode Command Line Tools, which can be easily installed using the following command:

xcode-select --install

Linux

The GCC compiler is a very popular way to build C programs and it is a good choice when using Linux. Each distro has its own set of development tools that comes with the GCC compiler out of the box. The development tools can be installed with the following commands:

Ubuntu / Debian / Debian derivatives
sudo apt-get update
sudo apt-get install build-essential
Arch Linux
sudo pacman -Sy base-devel
Fedora
sudo yum update
sudo yum groupinstall "Development Tools" "Legacy Software Development"

Windows

Because Windows is not a Unix like operating system, Windows Subsystem for Linux (a.k.a. WSL) could be a very good approach when writing C programs. It provides a full Linux system that can make the programming experience much better. The official documentation has a pretty good explanation about how to install WSL.

MinGW Compiler Collection is another good alternative to obtain access to the GCC compiler on a Windows system. The official documentation shows how it can be installed step by step.

Debuggers

A debugger is a tool that can become very handy when trying to find out how a program works or why it doesn't. There are many times when the code will compile successfully because syntactically there are no problems. However, that doesn't mean there aren't logical problems. If that is the case it might be a very good idea to use a debugger.

A very good option is LLDB. It is the default debugger in Xcode on macOS and supports debugging C, Objective-C and C++. It converts debug information into Clang types so that it can leverage the Clang compiler infrastructure.

Another very popular option is GDB. It supports the following languages (in alphabetical order): Ada, Assembly, C, C++, D, Fortran, Go, Objective-C, OpenCL, Modula-2, Pascal, Rust.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].