Final answer:
The correct statement to assign to variable 'x' the value of the next-to-last element of the array 'arr' is: x = arr[array_size - 2]. Arrays are zero-indexed; hence subtracting 2 gives the next-to-last element index.
Step-by-step explanation:
To assign to variable x the value of the next-to-last element of the array 'arr' when the size of the array is given by the integer 'array_size', you would use the following statement:
x = arr[array_size - 2];
Arrays in most programming languages are zero-indexed, which means the first element is at index 0, the second element is at index 1, and so on. Therefore, to access the next-to-last element, you need to subtract 2 from the array size. The correct statement is thus option b) x = arr[array_size - 2].