DEV Community

Discussion on: Why use pointers at all.

Collapse
 
albertalvarez profile image
Albert

For example, pointers allow to “return” arrays from functions (de name of an array is a pointer to the first element of the array). They also allow abstraction; you can pass a pointer to a function in drivers development to abstract hardware layer.

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

Ahhh I see, the quotation marks are important because we don't actually return the array, the body of the function defined the array, then placed it into memory? And so now we can access that spot in memory by it's address, I guess you could even get the size of the array and other such things.