this is a general question like what is the benefit of passing like int * x ? or when we should pass like int &x
Here in this video, parameters are passing like int * out, so how this is different from passing the parameter by reference?
In C++ arrays are passed by reference by default so you can pass the address of array as a pointer instead. It is a very common way of passing arrays as parameters.
Method 1: func(int arr[])
Method 2: func(int *arr)
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.