In the example below, both functions return the same result. Can someone please explain what the difference is between them?
#include <iostream>
void func1( int (&a)[4]) {
int b = a[3];
std::cout << b << std::endl;
}
void func2( int a[4]) {
int b = a[3];
std::cout << b << std::endl;
}
int main()
{
int b[4] = {3,2,3,4};
func1(b);
func2(b);
return 0;
}