News for hackers. Stuff that matters.
Re:How can C Programs be so Reliable? by lobster_johnson on Thursday September 22, 2011 @09:51AM (#3026050)
An even simpler analogy is a street address. (Or if you want to involve numbers: Postal codes.) An address is a place where people live, but it's not the actual place.
Re:How can C Programs be so Reliable? by nupark2 on Thursday September 22, 2011 @02:47PM (#3027217)
For people familiar with a spreadsheet, I think the Excel analogy better helps people understand the purpose of pointer dereferencing, because it's something you do all the time when building a mildly complex spreadsheet.
Re:How can C Programs be so Reliable? by Roboprog on Thursday September 22, 2011 @12:57PM (#3026724)
That's funny, my CS prof used to use addresses as an example of multi-dimensional array indices: "state" being a major index, down through city, street, to the number on the street being a minor index.
Re:How can C Programs be so Reliable? by Roboprog on Tuesday September 27, 2011 @08:44PM (#3045936)
Of course, in C, arrays are just funny looking pointers anyway, so I guess an address can be both a pointer and an ordered set of array indices.
Re:How can C Programs be so Reliable? by cpeterso on Thursday September 22, 2011 @01:32PM (#3026872)
I like the analogy of PO boxes at the post office. They are contiguous, numbered, contain data (or not), and could have a forwarding address to a new PO box.