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?

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’;

Download Printable PDF. VALID exam to help you PASS.

6 thoughts on “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?

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.