Image for post
Image for post

Pointers are one of the most powerful fundamentals of the C/C++ language, because developers are given direct access to the memory from one’s code in an easy and fast way. Pointers are variables whose value is the address of another variable, i.e., direct address of the memory location. So, in a sense pointers are a symbolic representation of addresses. They enable programs to simulate pass by reference, or pass by address, and can create and manipulate dynamic data structures. In other words, pointers allocate memory dynamically, which means memory allocated “on the fly” during run time that is usually placed in a program segment known as the heap or the free store. And when variables are passed by reference, the actual address is passed. If you’re still confused with the difference between pass by value and pass by reference, think of it like this: in the case of call by value we pass copies of values of passing arguments, in case of pass by reference, the address of the values is passed and no copies of the actual values are made.


Emma Gouti

Fullstack Software Engineer