Matrix

Matrix

Professional Development

15 Qs

quiz-placeholder

Similar activities

World Records: Superlatives.

World Records: Superlatives.

Professional Development

20 Qs

VCE-BETA-20.11.2023-AN

VCE-BETA-20.11.2023-AN

Professional Development

15 Qs

English for Beginners

English for Beginners

Professional Development

20 Qs

UK Culture

UK Culture

4th Grade - Professional Development

15 Qs

[ENGLISH SUPER STAR] Week 2 - Technology

[ENGLISH SUPER STAR] Week 2 - Technology

Professional Development

15 Qs

Complete IELTS 4.0 - Unit 4

Complete IELTS 4.0 - Unit 4

Professional Development

18 Qs

Inspector calls

Inspector calls

KG - Professional Development

11 Qs

SASI -BATCH 3-DAY2-FN

SASI -BATCH 3-DAY2-FN

Professional Development

15 Qs

Matrix

Matrix

Assessment

Quiz

English

Professional Development

Practice Problem

Hard

Created by

CCC info@ccc.training

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

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?