At Westonci.ca, we connect you with the answers you need, thanks to our active and informed community. Ask your questions and receive precise answers from experienced professionals across different disciplines. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.

A 2-dimensional 3x3 array of ints, has been created and assigned to tictactoe. Write an expression whose value is that of the middle element in the middle row.

Sagot :

fichoh

Answer:

tictactoe[1][1]

Explanation:

To access arrays, square boxes might be used which means specifying the row position and column position of a certain value in an array ::

Given a 2 - dimensional 3×3 array of integers :

Creating a dummy array assigned to the variable tictactoe :

[1 2 3]

[4 5 6]

[7 8 9]

We have a 3×3 array, that is 3 rows and 3 columns.

The middle element in the middle row is located in the second row ;second colum

Row and column Indexes starts from 0

Middle element in the middle row is the value 5 and it corresponds to :

tictactoe[1][1]

We call the variable name and the we use one square box each to house the row and column position.