I have a code wherein I pass a whole array to a function.
Is it possible to do exactly the same thing using pointers?
#include <iostream>
using namespace std;
void func(int array[]);
int main()
{
int array[] = {10,20,30,40};
func(array);
cin.get();
return 0;
}
void func(int array[])
{
cout << array[1];
}