✏️ Explanatory Question

What are the two ways of invoking functions?

👁 102 Views
📘 Detailed Answer
🟢 Easy
💡

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?