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,
| [reply] [d/l] [select] |
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) | [reply] |