Explain the difference between call by value and call by reference?

: 748
Paper : C Programming FAQ (Frequently Asked Questions and answers) for freshers | Platform : Procedural Programming Languages | Category : Programming FAQs

 

Call by Value

Call by Reference

We pass the copy of the values to the functions if there is no alteration in the original values. This is known as call by Value. 

We pass the copy of values to the functions, if original values are altered then it is known as call by reference.

The actual and formals arguments are stored in different memory locations

The actual and formal arguments are stored in the same memory location.

Suggested Papers: