Which of the following is a correct method header for receiving a two-dimensional array as an argument?
a) public static void pass My Array(int[],int[] myArray)
b) public static void pass My Array(int[1, 2])
c) public static void pass My Array(int[][])
d) public static void pass My Array[1][2])

Respuesta :

public static void pass My Array(int[][]) is a correct method header for receiving a two-dimensional array as an argument.

c) public static void pass My Array(int[][])

Explanation:

In programming languages two dimensional arrays are used to store by rows and columns, each data is accessed by row, column for example c[4][6], where 4 is represents the rows and 6 is represents columns.

End user can declare the two dimensions arrays with data type such as char or integer or string.

End user can will o pass a parameter of two dimensions to procedure or functions.  By passing parameter to function or function end user can use by ref or by value all depends on end user requirement.