CPS180 Chapter 8 Quiz Questions With Complete Solutions
int[][]values = {{3,4,5,1},{33,6,1,2}}; int v=values[0][0]; for(int[] list: values) for(int element: list) if (velement) v=element; S(v); correct answer: 1 How many elements are array matrix (int[][] matrix = new int[5][5])? correct answer: 25 Which of the following statements are correct? correct answer: char[][] charArray = {{'a', 'b'}, {'c', 'd'}}; What is the index variable for the element at the first row and first column in array a? correct answer: a[0][0] public static void main(String[] args) { int[][][] data = {{{1,2},{3,4}}, {{5,6},{7,8}}}; S(ttt(data[0])); } public static int ttt(int [][]m) {
Document information
- Uploaded on
- May 19, 2023
- Number of pages
- 6
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers