Show the relation between pointers and arrays. Offer some best practices on using pointers. Explain the most common caveats like buffer overflows, problems with null terminated strings or off by one errors.
Show the relation between pointers and arrays. Offer some best practices on using pointers. Explain the most common caveats like buffer overflows, problems with null terminated strings or off by one errors.
But, that laptop was ripped off and the particular file appears not to have made it into backups.
Does this description happen to ring a bell? Any references?
or possibly this (pdf warning): http://home.earthlink.net/~momotuk/pointers.pdf
Note that it's also available in an HTML version, at:
C doesn't syntactically distinguish rvalues and lvalues, so this level of indirection often goes unnoticed. I strongly suspect this is why learning pointers is often hard: trying to grasp an additional level of indirection before having comprehended the first one is nearly hopeless.
[1] Variables are containers for values. This is isomorphic to a constant pointer to a mutable cell.