Array sum of two arrays code is not giving any output


ide

@Anoushka_1805 Dry run your code from line 23 to 31 you are also accessing negative array indexes which may cause problem. See at line number 25 when n is negative and m is positive this line will execute but negative array index creates problem and can result in unexpected results.So avoid negative array index. Also in line number 19,22 last index of the array would be n-1, m-1 respectively and not n,m.


it is giving runtime error

RunTime error is caused because of the loop in line 27 which runs infinitely. But still answer seems to be incorrect. Please recheck your addition part. Let me know if you are not able to implement it correctly.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.