interchange of rows into columns and columns into rows

Unit #8 Test Review

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Michael Courtright
Used 2+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
diagonal elements
boundary elements
transpose of a matrix
2D array
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
elements that are not surrounded by other elements in all four directions
diagonal elements
boundary elements
transpose of a matrix
2D array
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
elements that either have the same row index and column index, or have a sum of the row index and column index that is equal to the array size – 1
diagonal elements
boundary elements
transpose of a matrix
2D array
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
visualized as a grid (or table) with rows and columns with the same type of data
diagonal elements
boundary elements
transpose of a matrix
2D array
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
public static void stationery(){
String[][] item = new String[][] { {"eraser","pen"},{"pencil","ruler"}, {"charts","sheets"},{"notebook","maps"}, {"clock","flash cards"},{"diary","colored pencil"} };
int m = item.length; // number of rows
int n = item[0].length; // number of columns
for(int col = 0 ; col < n; col++){
System.out.print(item[0][col] + " ");
System.out.print(item[m-1][col] + " "); }
}
}
What will be the output of the above code segment?
pen colored pencil eraser diary
clock flash cards diary colored pencil eraser pen pencil ruler charts sheets notebook maps
eraser diary pen colored pencil
eraser pen pencil ruler charts sheets notebook maps clock flash cards diary colored pencil
eraser ruler clock colored pencil
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Consider a method defined with a String 2D array parameter.
boolean test(String[][] val)
Which of the following is the correct method call statement?
boolean b = test(String); // String is a String 2D array with values
boolean b = test(String[][]); // String is a String 2D array with values
boolean b = test(string[][]); // string is a String 2D array with values
boolean b = test(string); // string is a String 2D array with values
string = test(boolean); // string is a String 2D array with values
7.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
int n= arr.length;
System.out.println("left top corner: " + arr[0][0]);
System.out.println("right top corner: " + arr[0][n - 1]);
System.out.println("left bottom corner: " + arr[n - 1][0]);
System.out.println("right bottom corner: " + arr[n - 1][n - 1]);
What will be the output if the above statements are executed with a square matrix, arr?
It will print nonboundary elements.
It will print major diagonal (left to right) elements.
It will print minor diagonal (right to left) elements.
It will print boundary elements.
It will print corner elements.
8.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following is/are true for Java methods?
I. Methods can have only one 2D array as a parameter.
II. Methods can return multiple 2D arrays.
III. Methods can have a 2D array as a parameter along with other types.
I only
II only
III only
I and II
I and III
9.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
void find(int[] arr){
k=row-1;
i=0;
for(j=0;j< arr.length;j++) {
temp=arr[i][j]; arr[i][j]=arr[k][j]; arr[k][j]=temp; }
}
Which of the following is true with respect to the above code?
The code interchanges row 0 and row 1.
The code interchanges column 0 and column 1.
The code copies the value of row 0 to row 1.
The code interchanges the first column and the last column.
The code interchanges the first row and the last row.
Similar Resources on Quizizz
10 questions
C Programming - Dia Aberto - EPC

Quiz
•
9th - 12th Grade
10 questions
8.2 Arrays Cambridge IGCSE 0478

Quiz
•
10th Grade - University
14 questions
Arrays, lists, tuples, stacks and queues

Quiz
•
11th - 12th Grade
10 questions
Программирование C#

Quiz
•
1st - 10th Grade
10 questions
Soal-soal C++

Quiz
•
11th Grade
10 questions
Array

Quiz
•
10th Grade
8 questions
2D Arrays in Java (Review)

Quiz
•
12th Grade
11 questions
List of References

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University