Jens Gustedt's Blog

February 7, 2015

Modern C: Level 2 available

Filed under: C11, language, library — Jens Gustedt @ 16:35

I am pleased to announce the feature completion of Level 2 of my book

Modern C

It deals with most principal concepts and features of the C
programming language, such as control structures, data types,
operators and functions. Its knowledge should be sufficient for an
introductory course to Algorithms, with the noticeable particularity
that pointers aren’t fully introduced here, yet.

As before, the current version of the book can be found at my homepage

http://icube-icps.unistra.fr/index.php/File:ModernC.pdf

and also as before, constructive feedback is highly welcome. Many
thanks to those that already gave such valuable feedback for previous
version.

Advertisements

6 Comments

  1. Looks like a nice book, but where are the pages 154 – 164? There seem to be some pages in the summary that refer to it, but they don’t work. Those pages are a work in progress?

    Comment by anto — February 18, 2015 @ 18:42

    • Did you read the title page? It clearly states that these Levels are yet to come.

      Comment by Jens Gustedt — February 18, 2015 @ 18:59

  2. An excellent book. I’m really looking forward to see it completed. Finally a book about C telling us not to use postfixed incrementer, that you CAN initialize an array while declaring it and giving a coherent order for the qualifiers.

    Speaking of qualifiers, I feel like their ordering could be explained a little bit further.

    Quoting :

    char const* const path_name;

    Here the first const qualifies the char to its left, the * makes it to a pointer and the
    second const again qualifies what is to its left.

    I’m not what you may call a C guru but I used to routinely use the language and I must confess I simply did not understand this section. This is the first time I see this particular construct and the accompanying (and quite laconic!) text did not permit me to understand what it does. I did not find in the book a clear section explaining how the ordering of the const qualifiers (or any qualifiers for that matter) affects the declaration.
    This is especially frustrating because this seems like a great idea to systematize the format of qualifiers in order to render the code more straightforward and I know I definitely want to, as of now, adopt this approach except that… I just don’t really understand it.

    You might want to expand on this particular point, I’d be happy to understand this!

    Comment by Gael FATOU — February 20, 2015 @ 13:51

  3. Hi Gael, thanks for the feedback.
    The part that you are citing is really only meant to introduce the syntactic conventions that we use for qualifiers and not to explain qualifiers and how they work.
    That is why it is in a section “Warning to experienced programmers”.
    That said I see that such an explanation about qualifiers (and const in particular) might be missing. I’ll look into it.

    In the example, that just means that pathname is a non-modifiable pointer to non-modifiable data of type char.
    Hope that helps
    Jens

    Comment by Jens Gustedt — February 21, 2015 @ 17:07

  4. Love your book. How can I donate ?

    Comment by Jingzhe — September 2, 2015 @ 09:22

    • Thanks! No, there is no need or possibility to donate. But you can always spread the word.

      Comment by Jens Gustedt — September 2, 2015 @ 09:32


RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Create a free website or blog at WordPress.com.