C – Pass by Reference

Home/C - Tutorial/C - Functions/C – Pass by Reference
C – Pass by Reference 2017-07-19T23:59:59+00:00

Pass by Reference :

When passing by reference technique is used, the address of the data item is passed to the called function. Using & operator we can determine the address of the data item. Note that function once receives a data item by reference, it acts on data item and the changes made to the data item also reflects on the calling function. Here you don’t need to return anything to calling function.

C – PASS BY REFERENCE EXAMPLE :

Output :

Enter two numbers

10

20

Sum of 10 and 20 is 30

 

Prev Next