0 votes
32 views
asked in C++ by
HI all

  How to Pass the array elements to functions?

1 Answer

0 votes
answered by

When you pass full array as argument it passes as reference and their is no need of address operator(&), but when you pass a single array element it passes by value and you have to use address operator to pass it by reference (&) 

Passing full array 
 

fun(a);



Passing element of array 

fun(&a[3]);
 

Categories

...