Write a function that returns the sum of two arrays. Print the value returned

#include
using namespace std;

int N,M;
std::cin>>N;
std::cin>>M;
int arr1[N];
int arr2[M];
int arr3[N+M];
for( int i=0;i<=N;i++)
{
	std::cin>>arr1[i];
}
for(int j=0;j<M;j++)
{
	std::cin>>arr2[j];
}
int sum( )
{
	for(int k=0;k<M+N;k++)
	{
		arr3[]=arr[i]+arr[j];
	}
	for(int k=0;k<N+M;k++)
	{
		std::cout<<arr3[]<<" ,";

	}

std::cout<<"END";
}
return 0;

int main()
{
sum();
}

what is wrong in this code

@Anoushka_1805 hey Anoushka your approach is not right. you’re bit confusing with this question.
see this

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.