In reply to Pooja.balachandran:
Once you have some elements in dynamic array, you can just iterate based on its size and substract element by element, if both the arrays are having same size and same index to compare. Else you have to put some logic to find respective index and substract.
If size and index are same, then you can do
foreach(dyn_arr1[i]) result_arr[i] = dyn_arr1[i] - dyn_arr2[i];