Array- ma value in array

when i am giving negative inputs in array why is it giving max value as zero

@Aditiverma hey aditi there is one mistake in your code is that you are giving maxsize =0 declare him as maxsize =arr[0];
after declaration of array

its still coming zero

@Aditiverma hey aditi this is because your maxsize taking garbage value how can you give that value which was not taken you should initialize after taking inputs of array