MAQ Software Interview Question

You are given an array, print all the subarrays with a given sum.