Subtraction is associative for:
An associative operation is a calculation that gives the same result regardless of the way the numbers are grouped.
3 - (2 - 5) = 6 and (3 - 2) - 5 = - 4.
3 - (2 - 5) ≠ (3 - 2) - 5.
So, subtraction is not associative for whole numbers.
Similarly, it is not associative for integers and rational numbers also.