If I only pass an element of an integer array (not the whole array) to a function , is it passed by value or by reference by default ?
for example-
arr[]={2,3,4,5,6}
ans=fun(arr[2])
and fun is some function which multiplies any value by 2 , then will i get the ans as 8 or 4 if i print arr[2] in the main function afterwards? Any help would be appreciated.