Answer:
C. "Condition one" is printed once, and "Condition two" is printed twice.
Explanation:
Given
The above code segment
Required
The number of times is executed
For "Condition one" to be printed, the following conditions must be true:
if (col > 0) ---- the column must be greater than 0 i.e. column 1 and 2
if (arr[row][col] >= arr[row][col - 1]) --- the current element must be greater than the element in the previous column
Through the iteration of the array, the condition is met just once. When
and
For "Condition two" to be printed, the following condition must be true:
if (arr[row][col] % 2 == 0) ----array element must be even
Through the iteration of the array, the condition is met twice. When
and
and