Final answer:
To compute the distance between the first and last zero elements in the array, iterate through the array and find their indices. Subtract the indices to find the distance.
Step-by-step explanation:
To compute the distance between the positions of the first and last zero elements in the given array, you can iterate through the array and keep track of the indices where zeros are found. Once you have the indices of the first and last zero elements, you can subtract them to find the distance.
For example, in the array 3 0 1 0 4 9 5 0 6, the first zero is at index 1 and the last zero is at index 7. The distance between them is 7 - 1 = 6.