The following grid shows the state of a 2D array:
This grid is created with the following code:
Which line of code, when inserted in place of //line n1, adds an X into the grid so that the grid contains three consecutive X’s?
A. grid[2][1] = ‘X’;
B. grid[3][2] = ‘X’;
C. grid[3][1] = ‘X’;
D. grid[2][3] = ‘X’;
A
answer is A since other options goes out of the 2-d array
A
Answer is A
A
answer is A