1
2
3
4
5
6
Use the "Verify Solution" button to get AI feedback on your C++ code.
You are provided with a C++ function calculateArraySum that is intended to compute the sum of all integer elements in a given array. The function takes two arguments: an integer array arr and its size n.
Currently, the function contains an error in its loop condition and is missing the accumulation logic.
Your task is to: