Maximum sub array problem of online platform

https://ide.codingblocks.com/s/47187
giving wrong ans on the test case;

Hey Shanu, I have corrected your code and commented the changes you can refer this