1. Para inicializar un arreglo de enteros en Java, puedes usar: int[] numbers = new int[___];
Algoritmo y estrucutura de datos S4

Quiz
•
Computers
•
12th Grade
•
Hard

Carlos Matute
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
10
a,b,c
10,2,c
true
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
2. Para buscar un elemento en un array, puedes usar un bucle como este: for(int i = 0; i < numbers.length; i++) { if(numbers[i] == ___) { return i; }}
elementIndex
searchValue
targetValue
currentValue
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
3. Para agregar un elemento a un array, necesitas crear un nuevo array con un tamaño mayor y copiar los elementos. El código se ve así: int[] newArray = new int[___]; for(int i = 0; i < oldArray.length; i++) { newArray[i] = oldArray[i]; }
oldArray.length * 2
oldArray.length - 1
oldArray.length + 1
oldArray.length + 2
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
4. Para encontrar el valor máximo en un arreglo, puedes usar: int max = ___; for(int i = 0; i < array.length; i++) { if(array[i] > max) { max = array[i]; }}
int max = Integer.MIN_VALUE;
int max = array[0];
int max = array[array.length - 1];
int max = 0;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
1. ¿Cuál es la forma correcta de crear una matriz de enteros en Java con 3 filas y 4 columnas?
int[][] matriz = new int[3][4];
int matriz[][] = new int[3,4];
int matriz[3][4];
int matriz = new int[3][4];
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
2. ¿Qué código se utiliza para mostrar una matriz triangular superior en Java?
for(int i = 0; i < matriz.length; i++) { for(int j = i; j < matriz[i].length; j++) { System.out.print(matriz[i][j] + " "); } }
for(int i = 0; i < matriz.length; i++) { for(int j = 0; j < matriz[i].length; j++) { if(i > j) System.out.print(matriz[i][j] + " "); } }
for(int i = 0; i < matriz.length; i++) { for(int j = 0; j < matriz[i].length; j++) { System.out.print(matriz[j][i] + " "); } }
for(int i = 0; i < matriz.length; i++) { for(int j = 0; j < matriz[i].length; j++) { if(i < j) System.out.print(matriz[i][j] + " "); } }
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
3. ¿Qué hace el siguiente código en Java: int[][] matriz = new int[5][5]; for(int i = 0; i < 5; i++) { for(int j = 0; j < 5; j++) { if(i == j) matriz[i][j] = 1; else matriz[i][j] = 0; }}
Crea una matriz de ceros.
Crea una matriz identidad de 5x5.
Crea una matriz triangular inferior.
Crea una matriz triangular superior.
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Advanced Java Study Guide

Quiz
•
11th - 12th Grade
12 questions
ROBOTICA FISICA 3B M2A06 Matriz de LED 8x8

Quiz
•
12th Grade
15 questions
Python Revision Tour - I

Quiz
•
12th Grade
12 questions
Quiz Variables y Constantes

Quiz
•
12th Grade
6 questions
Sains Komputer Tingkatan 4 - 1.3.5 Penggunaan Penyataan

Quiz
•
7th - 12th Grade
8 questions
CS A U1 Review

Quiz
•
12th Grade
11 questions
C Language

Quiz
•
10th Grade - University
15 questions
Intro to Java Loops

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