#include<bits/stdc++.h>
using namespace std;
int calsum(int arr1[],int arr2[],int n,int m)
{
int sum[n];
int i=n-1,j=m-1,k=n-1;
//i iterator for first array with more size
//j iterator for second array with less size
//k for new array
int carry=0,sum=0;
//iterate over smaller array
while(j>=0)
{
s=arr1[i]+arr2[j]+carry;
sum[k]=(s%10);
carry=s/10;
k–;
i–;
j–;
}
int ans=0;
if(carry)
{
}
}
int main()
{
int n,m;
cin>>n;
int *arr1=new int[n];
for(int i=0;i<n;i++)
cin>>arr1[i];
cin>>m;
for(int i=0;i<m;i++)
cin>>arr2[i];
}
how to deal with corner case i.e sum is still there,pls help me to write this case,my program is incomplete