Modern C: Level 2 available

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

Click to access File:ModernC.pdf

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

6 thoughts on “Modern C: Level 2 available”

  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?

  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!

  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

Comments are closed.