Quiz #6

1. Declare a two-dimensional array named "a" with 2 rows and 4 columns. Initialize the i,j-th element of "a" to i-j using nested for loops.

 

2. Declare two arrays named "a" and "b". Fill "a" with the numbers { 1, 2, 3, 4, } and fill "b" with the numbers { 5, 6, 7, 8 }. Write a method called "CopyIt" that takes two integer arrays as parameters and copies the elements of the first integer array into the second integer array. Show the call to your "CopyIt" method using the arrays "a" and "b".