Doubts on arrays

if an array has only been declared will it contain garbage values or zeros?

also
when we are iterating over an array to fill the elements of the array if we fill only fill half the array will rest of the elements automatically be assigned to zero or will they contain garbage value?

hello @ashishxmathew

it will depend on compiler .
in some cases we get zero whereas in some cases garbage is there. (in java by defualt it is 0)

the otherhalf (untouched part) will either contain garbage or 0.