Computer Science, asked by sivaganesh7, 1 year ago

give 3 applications of pointers in c

Answers

Answered by chordiasahil24
2
pointers are generally useful in the context where we need a continuous memory allocation. Using pointers dynamic allocation of memory is achieved
pointers basically hold the address of a variable. they are mainly used as function parameters to pass values of parameters as references rather than values
A few advantages:
- Pointers allow you to implement sharing without copying
- Pointers allow modifications by a function that is not the creator of the memory i.e. function A can allocate the memory and function C can modify it, without using globals, which is a no-no for safe programming.
- Pointers allow us to use dynamic memory allocation.
Hope it's helpful
Similar questions