Search Header Logo

Lección-Matrices

Authored by Andrea Sánchez

Other

University

Used 5+ times

Lección-Matrices
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Cómo declararía una matriz de tipo entrera, de orden 3 columnas y 4 filas?

int matriz[][] = new int[3][4];
int matriz[][] = new int[4][3];
int new matriz[][] = int[3][4];
int new matriz[][] = int[4][3];

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

¿Cuál de las siguientes expresiones, es correcta?

int [][] matriz = {{2,4,4};{6,6,9};{8,10,12}};
int [][] matriz = {(2,4,4),(6,6,9),(8,10,12)};
int [][] matriz = {{2,4,4},{6,6,9},{8,10,12}};
int [][] matriz = {(2,4,4); (6,6,9); (8,10,12)};

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

¿Cuál es la forma correcta de declarar una matriz bidimensional en Java?

int[][] matriz;,

int matriz[];

int[][] matriz;

int matriz[][],

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Cuál es la forma correcta de acceder al elemento en la fila 3, columna 2 de una matriz bidimensional llamada "matrix"?

matrix[2][3];

matrix[3][2];

matrix[1][2];

matrix[2][1];

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Qué hace el siguiente código?

for (int i = 0; i < 3; i++) {

for (int j = 0; j < 3; j++) {

matriz2[i][j] = matriz[j][i];

}

}

Imprime una matriz1

Almacena los datos de matriz en nueva matriz2. Los datos son los mismos.

Transpone los datos de matriz en matriz2

Solicita llenar los datos de la matriz.

6.

FILL IN THE BLANK QUESTION

45 sec • 1 pt

¿Qué palabra hace falta, para que el siguiente comando funcione?

nFilas = Integer.Int(JOptionPane.showInputDialog("Número de filas: "));

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Para llenar los datos de una matriz de tipo entero, de orden 4x3, se utiliza el código:

for(int i=0; i<3; i++){

for(int j=0; j<3;j++){

System.out.print("Matriz ["+i+"]["+j+"]: ");

matriz[i][j]= entrada.nextInt();

}

}

¿Cuál es el error?

El valor de las filas no es el correcto.

Hace falta un punto y coma después de los paréntesis del ciclo for.

La línea de lectura y almacenamiento en matriz[i][j], está incompleta.

System.out.print está mal escrito.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?