Skip to content

C programming, again ! ✨

As our number of training session is quite limited, doing C coding while exchanging about it with your peers with a similar level of expertise is probably the fastest way. We encourage you to group, discuss and gain knowledge together. And never hesitate to ask questions to the teacher.

This lecture come in two tracks:

  1. Full beginner in C programming. You will have to catch as fast as possible as C will be used in all practicals of OS lectures starting early September.

  2. Medium to advanced C programmer. We propose some small exercises dedicated to the main point used in OS lectures. The goal is to let you fully understand the memory interaction, processus debugging and of course, pointers.

C-language is a pre-requisite of many lectures of the year, starting with the OS lectures, early september. The better your level at the end of the training week, the easier will be your master year from the programming point of view.

Never hesitate to ask question to the teacher. No question is stupid enough to delay the query of an answer. Do not wait.

A full session on Git source code management will also be quite usefull.

Table of content

  1. Track for full beginners:
  2. Track for medium/advanced programmer
  3. Git fundamentals
  4. Other exercises

Track for full beginners 🛫

  1. Write C code ! Your first 800 lines of C (roughly 4 to 6 hours of practice). The teacher will give you a subject of a few pages with code of mini ascii games to write. It is distributed on plain paper only. Do not expect ever any distributed electronic version of this subject.
  2. Then, along the semester, you may read and practice the book ''Modern C'' of Jens Gustedt 📚. Namely, rewrite (not copy-paste) the examples. Compile them and execute them. You should reach ideally the end of the pointer section (at the middle of the book). This book is opinionated. Thus, other (or older) books may propose slightly different choices, conventions and explanations.
  3. ALTERNATIVE LESS OPINIONATED: If you dislike the previous book, The wikibook on C at https://en.wikibooks.org/wiki/C_Programming is also a quite nice starting resource.
  4. For French readers, The book ''Le langage C'' of Bernard Cassagne is a very progressive book. It can be found at http://matthieu-moy.fr/cours/poly-c/. But it does not cover the modern evolutions of the language.

Track for medium to advanced programmer 🚀

The subjects of the practical lab of the training week

The subject of the practical

The subject uses the source code skeletons available in two repositories

First, the C for OS part is at codeberg.org

1
$ git clone https://codeberg.org/gmounie/CforOS.git
Second, the classical C part is at the following GitHub repository

1
$ git clone https://github.com/gmounie/ensimag-rappeldec.git

Advanced Debuging (in French)

The GDB advanced tutorials part are uploaded into wikiversity (French edition): Wikiversity/Débogage avancé

The MOSIG C Programming presentation

The slides of the presentation

Git fundamentals

Git lectures and practical

Other exercises for intensive C training

The website ''Exercism.io'' proposes a lot of progressive practices in many languages, including C.

https://exercism.io/tracks/c