No products in the cart.

What is the difference between call …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

What is the difference between call by value and call by reference
  • 1 answers

Sia ? 3 years, 5 months ago

Parameters Call by value Call by reference
Definition While calling a function, when you pass values by copying variables, it is known as "Call By Values." While calling a function, in programming language instead of copying the values of variables, the address of the variables is used it is known as "Call By References.
Arguments In this method, a copy of the variable is passed. In this method, a variable itself is passed.
Effect Changes made in a copy of variable never modify the value of variable outside the function. Change in the variable also affects the value of the variable outside the function.
Alteration of value Does not allow you to make any changes in the actual variables. Allows you to make changes in the values of variables by using function calls.
Passing of variable Values of variables are passed using a straightforward method. Pointer variables are required to store the address of variables.
Value modification Original value not modified. The original value is modified.
Memory Location Actual and formal arguments will be created in different memory location Actual and formal arguments will be created in the same memory location
Safety Actual arguments remain safe as they cannot be modified accidentally. Actual arguments are not Safe. They can be accidentally modified, so you need to handle arguments operations carefully.
Default Default in many programming languages like C++.PHP. Visual Basic NET, and C#. It is supported by most programming languages like JAVA, but not as default.
http://mycbseguide.com/examin8/

Related Questions

What is mean by buffering in file handling?
  • 1 answers
What are called tokens
  • 2 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App