Max Subarray Sum

When I solve this question in your website’s ide , it shows me the correct answer but when im submitting the same it displays that my testcase 1 has failled.
https://ide.codingblocks.com/s/55997
Above is the saved code

Hi Manit, first of all, you had to use long data type because the constraints are:
1 <= N <= 100000 1 <= t <= 20 0 <= A[i] <= 100000000
Secondly, you had to initialise sum=0 inside for loop for test cases.

I have made these changes to your code and you can refer to it here https://ide.codingblocks.com/s/56024

Thanks, but you dont need to use long int , the code will work just after initializing the sum to 0