Demystifying Pointers in C and C++
Pointers in C and C++ can be tricky to understand. But they don’t have to be.
We’ve released a video course on the freeCodeCamp.org YouTube channel that will take the mystery out of using pointers in C and C++.
The course was developed by Harsha and Animesh from MyCodeSchool. MyCodeSchool is one of the oldest software channels on YouTube. Animesh currently works as an engineer on Google’s search team. Harsha was the highest ranked Indian programmer on the Top Coder competitive programming platform.
MyCodeSchool has an inspiring and sad story. You can read about it here in this article written by Quincy Larson.
Pointers are special variables that are used to store addresses rather than values. A proper understanding of them can open up a lot of possibilities when programming in C and C++.
Here are the topics covered in this course:
- Introduction to pointers in C/C++
- Working with pointers
- Pointer types, pointer arithmetic, void pointers
- Pointers to Pointers in C/C++
- Pointers as function arguments – call by reference
- Pointers and arrays
- Arrays as function arguments
- Character arrays and pointers – part 1
- Character arrays and pointers – part 2
- Pointers and 2-D arrays
- Pointers and multidimensional arrays
- Pointers and dynamic memory – stack vs heap
- Dynamic memory allocation in C – malloc calloc realloc free
- Pointers as function returns in C/C++
- Function Pointers in C / C++
- Function pointers and callbacks
- Memory leak in C/C++
You can watch the entire course on the freeCodeCamp.org YouTube channel (4-hour watch).
Read More …