Ask Question

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])

+3
Answers (1)
  1. 20 September, 08:47
    0
    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.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “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 ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers