In an integer array, you need to find out and return the sum of two elements such that their absolute sum is closest to zero

All QuestionsCategory: C LanguageIn an integer array, you need to find out and return the sum of two elements such that their absolute sum is closest to zero
Anonymous asked 3 years ago

Example:
Input : arr[]={3,-1,5,-2,4}
Output: 3-2=1, abs(1)=1, which is closest to zero