C++ Arrays and Functions
You pass an array to a function, very similarly as to how you would pass a non-array variable. There are two differences. You need to include square brackets after the array name so C++ knows its and array Realize that you are passing by reference. The book recommends that you always pass the size of…