Chapter 8 Flashcards
1
Q
what is the syntax for declaring 2 dimensional arrays?
A
elementType arrayName [ROW_SIZE] [COLUMN_SIZE];
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;
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} };