Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: C tutorial for Perl programmers?

by QuarterToWhen (Novice)
on Sep 03, 2013 at 11:11 UTC ( [id://1052083]=note: print w/replies, xml ) Need Help??


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)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1052083]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-25 17:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found