Passing pointers to functions

Pointers are often passed to a function as arguments. This allows a calling a portion of the program

  • • to be accessed by the function,
  • • altered within the function, and
  • • returned to the calling portion of the program in altered from

We refer to this use of pointers as passing arguments by reference.

When an argument is passed by the value, the data item is copied to the function. Thus a change made to data item within the function is not carried over into the calling function. whenever an argument is passed by reference, the address of the data item is passed to the function rather than the data item itself. The value store in that address can be accessed freely, either within the function or within the calling routine. Moreover, any change that made to the data item will be recognized in both called and calling functions.



About the Author



Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.

We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc





 PreviousNext