I'll hold a little presentation about C-Pointers in a small group of people with beginners programming skills, with no CS background. Just people who would like to learn something about coding and prefer a practical hands-on approach. In fact, they are using the C-Language to do so.
We are about to introduce pointers and I am very careful about the scope for the first introduction, since pointers can be quite overwhelming and confusing for the uninitiated.
So I am wondering, how would you approach this topic to make it fun and interesting? Do you have great examples that really help people to understand the concept of pointers?
Hint: The audience doesn't know about strings and arrays yet.
Scope-wise, here is what I've got so far:
Example: A problem that shows the limitation C without pointers and why we need something more elaborate.
- Call by reference vs Call by value example?
Very short introduction what a pointer is and how it is denoted in C. (* and & operators )
The difficult part: How does a pointer work? Or: How to explain a technical problem to non-technical people?
- Looking for a real work example for a referencing system. Is a library a good example?
- What is memory and how does it interact with our code and variables?
- How does a variable look like in memory? (memory allocation)
- How is this variable accessed? (address referencing)
- How can I use a pointer to access memory?
- In dire hope, people can follow this train of thought:
- Live example and practice
Things I would like to omit for a part2:
- Pointer on Pointers
- Pointer arithmetic
- Adresses vs. Pointers