Matrix Basics
Operations
Programming
Common Errors
Applications
100

What is a data structure that represents a grid of elements arranged in rows and columns?

A Matrix

100

What type of loop structure is required to visit every element of a matrix?

Nested loops

100

When passing a matrix to a function in C, which dimension must always be specified?

The column dimension

100

What happens if you access an index that does not exist?

A runtime error

100

What are matrices commonly used for?

Graphics, games, data prosessing and images

200

How is a matrix implemented in C programming?

As a two-dimensional array

200

What condition must two matrices satisfy in order to be added together?

They must have identical dimensions

200

How do you access an element of a matrix?

Using two indices: row and column

200

What do we call the unpredictable values found in an uninitialized matrix?

Garbage values

200

What real-world tool is an example of matrix-based data organization?

Spreadsheets or data tables

300

How many total elements are stored in int m[3][4]?

12 elements

300

What is the name of the storage method where all elements of the first row are stored in memory before the second row?

Row-major order

300

What declaration creates a matrix with 2 rows and 3 columns in C?

int m[2][3];

300

What logical mistake happens when you swap i and j in nested loops?

Confusing rows and columns

300

In which field are matrices fundamental for image processing and pattern recognition?

Computer vision

400

At what number do matrix indices to start in C?

0

400

How is matrix addition performed?

Element-by-element

400

What value is assigned to missing elements in a partially initialized matrix?

0

400

What problem occurs if you forget to specify the column size in a function prototype?

A compiler error

400

What type of mathematical systems are commonly solved using matrices?

Linear systems.

500

How do you access the bottom-right element of a matrix with R rows and C columns?

matrix[R-1][C-1]

500

What pointer arithmetic formula is used to access an element in row-major order?

*(matrix + i*Cols + j)

500

In matrix traversal with nested loops, which loop usually controls the rows?

The outer loop

500

What is the maximum valid index in a dimension of size N?

N-1

500

What type of transformations in graphics programming rely heavily on matrices?

 Geometric transformations