in reply to Re: C tutorial for Perl programmers?
in thread C tutorial for Perl programmers?

That looks like a good start. I might leave pointer arithmetic for "if we have more time". I could probably spend a few days on that alone, likewise type promotion.

Replies are listed 'Best First'.
Re^3: C tutorial for Perl programmers?
by Athanasius (Archbishop) on Sep 04, 2013 at 06:34 UTC

    Also, don’t overlook these:

    • definition vs. declaration
    • the preprocessor: #define, conditional compilation, #include
    • arrays and const
    • struct, union, enum, and typedef
    • the more commonly-used standard libraries: stddef.h, stdio.h, string.h, stdlib.h
    • the different uses of static

    Some more advanced topics for later:

    • extern
    • variadic functions
    • long jumps

    Also of practical help when teaching memory management: explain the meaning of “segmentation fault” and “bus error” — your student(s) will be seeing a lot of these! ;-)

    Hope that helps,

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Re^3: C tutorial for Perl programmers?
by bulk88 (Priest) on Sep 04, 2013 at 07:04 UTC
    Dont leave pointer arithmetic for later. Teach it early. It was the hardest thing for me to understand when going from Perl to C, if a pointer is just a number, why is +2 way to far off to the right in memory? Do I have to do +0.5 to get to the first slice? (no, go learn pointer arthmitic)