Welcome to Westonci.ca, the ultimate question and answer platform. Get expert answers to your questions quickly and accurately. Get immediate and reliable solutions to your questions from a knowledgeable community of professionals on our platform. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our platform.

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.