Array sum of two arrays

https://ide.codingblocks.com/s/238015 sir this code gives run time error and plz check and tell me that I am doing correct or not

You are taking c to be the largest size among two arrays. This is giving runtime because the elements having smaller no. of elements will get exhausted.

So sir what should i do to correct my code can you suggest me the way to do

Solve it by taking c to be minimum.