There are multiple reasons for using a pointer. I will give you some :
preventing making copies of data. using a pointer to alter data alters the original data instead of creating new copies fo the data.
Using complex structures of data. Using pointers can facilitate the use of complex data structures like stacks, queues, and linked lists.
Pointers can be used to pass arrays and strings to functions
these are a few advantages that practically make sense and I have used pointers for the above reasons itself. if you need more information or you wanna discuss then feel free to do so.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There are multiple reasons for using a pointer. I will give you some :