take a look
using namespace std;
void input (int test)
cout<<"Enter a number: ";
cout<<array[i]; //shows the same values that i have input using the //function
I am passing array to function but it is being passed by reference..Could you please explain this concept?
Why is this being passed as reference even though i am not using & operator to pass it as reference. I wrote a bubble sort algorithm using the same concept and i passed the array to function and did not return anything but it sorted the array in my main function which is weird as i did not pass the array by reference. I passed it like in the above program.
Could you guys please explain this?I've been trying to find answer on Google but haven't been able to find it yet.Hopefully you guys can help.