Arrays-max value in array

question:https://hack.codingblocks.com/contests/c/509/197
answer:https://ide.codingblocks.com/#/s/24046
2/4 test cases passed

One small mistake is that max is initialised to arr[0] before taking its input.
I have corrected the code:

https://ide.codingblocks.com/#/s/24247