Chapter 8 Flashcards

1
Q

what is the syntax for declaring 2 dimensional arrays?

A

elementType arrayName [ROW_SIZE] [COLUMN_SIZE];

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what would you do if you wanted to assign 7 to the first row in the second column in an array called matrix

A

matrix[1][2] = 7;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

show an example of how you can use an intializer to intialize and declare a 2D array

A
int [3][3] =
{
{3, 4, 6} ,
{4, 6, 3} ,
{2, 8, 3}
};
How well did you know this?
1
Not at all
2
3
4
5
Perfectly