Sum of two Arrays

Check why this code not generating correct output

Refer the approach from here