C – Call By Reference

Call by reference: An address of the variable is passed to the function.

Note: Call by reference is preferred when we have to return more than one variable, like in C programming where we can only return one variable at a time. Call by reference can be achieved via pointers.

Call By Reference: In this example, the output shows the correct result. This happens because we have sent the exact address of the variable.

Scroll to Top