Matrix

Matrix

Professional Development

15 Qs

quiz-placeholder

Similar activities

Sasi-FN-04.05.2024

Sasi-FN-04.05.2024

Professional Development

15 Qs

PROGRAMMING IN C

PROGRAMMING IN C

Professional Development

13 Qs

VRESEC-24.01.2024-AN-1-3

VRESEC-24.01.2024-AN-1-3

Professional Development

15 Qs

Sasi-AN-02.05.2024

Sasi-AN-02.05.2024

Professional Development

15 Qs

VCE-ALPHA-25.11.2023-AN

VCE-ALPHA-25.11.2023-AN

Professional Development

15 Qs

DSBS-AN-29.01.2024

DSBS-AN-29.01.2024

Professional Development

15 Qs

DSBS-FN-30.01.2024

DSBS-FN-30.01.2024

Professional Development

15 Qs

De todo

De todo

1st Grade - Professional Development

16 Qs

Matrix

Matrix

Assessment

Quiz

English

Professional Development

Hard

Created by

CCC info@ccc.training

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int matrix[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; printf("%d", matrix[1][2]); return 0; }
Prints the element in the second row, third column
Prints the element in the third row, second column
Prints the sum of all elements in the matrix
Causes a compilation error

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int matrix1[2][2] = {{1, 2}, {3, 4}}; int matrix2[2][2] = {{5, 6}, {7, 8}}; int result[2][2]; for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { result[i][j] = matrix1[i][j] + matrix2[i][j]; } } printf("%d", result[1][1]); return 0; }
Matrix Multiplication
Matrix Addition
Matrix Subtraction
Transposition

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int matrix[2][2] = {{1, 2}, {3, 4}}; printf("%d", *(&matrix[0][0] + 2)); return 0; }
3
2
1
4

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int matrix[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; for (int i = 0; i < 3; i++) { for (int j = i+1; j < 3; j++) { int temp = matrix[i][j]; matrix[i][j] = matrix[j][i]; matrix[j][i] = temp; } } printf("%d", matrix[2][0]); return 0; }
Transposition
Matrix Inversion
Scalar Multiplication
Identity Matrix

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int matrix[2][3] = {{1, 2, 3}, {4, 5, 6}}; int transpose[3][2]; for (int i = 0; i < 2; i++) { for (int j = 0; j < 3; j++) { transpose[j][i] = matrix[i][j]; } } printf("%d", transpose[1][0]); return 0; }
Transposes the matrix
Finds the determinant of the matrix
Multiplies the matrix by its transpose
Causes a compilation error

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int matrix[2][2] = {{1, 2}, {3, 4}}; int *ptr = matrix[0]; printf("%d", *(ptr + 2)); return 0; }
3
2
1
4

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int matrix1[2][3] = {{1, 2, 3}, {4, 5, 6}}; int matrix2[3][2] = {{7, 8}, {9, 10}, {11, 12}}; int result[2][2] = {0}; for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { for (int k = 0; k < 3; k++) { result[i][j] += matrix1[i][k] * matrix2[k][j]; } } } printf("%d", result[1][0]); return 0; }
Matrix Addition
Matrix Multiplication
Matrix Subtraction
Transposition

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?