Pointer is a variable that stores memory addresses. Unlike normal variables it does not store user given or processed value, instead it stores valid computer memory address.
Pointer allows various magical things to be performed in C.
Pointers are more efficient in handling arrays and structures.
Pointers are used to return multiple values from a function.
Pointer allows dynamic memory allocation and deallocation (creation and deletion of variables at runtime) in C. Which undoubtedly is the biggest advantage of pointers.
Pointer allows to refer and pass a function as a parameter to functions.
and many more...
For beginners pointers can be a bad dream if not practiced well. However, once mastered you can do anything you want to do in C programming language.
In this exercise I will cover most of the pointer related topics from a beginner level. Always feel free to drop your queries and suggestion down below in the comments section.
No comments