For this i have to change data type of array element or increase size of array

-100000000 <= A[i] <= 100000000
long long int A[n] is correct for above requirment

Yes long long int is correct type because sum can be more than INT_MAX, size of array remains number of elements (n)

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.