Home / Questions / What are the two ways of invoking functions?
Explanatory Question

What are the two ways of invoking functions?

👁 102 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

Two ways of invoking functions:

  • Call by value: The actual value is passed to the function, and changes made in the function do not affect the original variable.
  • Call by reference: A reference (address) to the variable is passed to the function, and changes made in the function affect the original variable.
What are the two ways of invoking functions?
Figure: What are the two ways of invoking functions?