declare -a MY_ARRAY=()
Does the declaration of array in this way in bash will initiate all the array elements to 0?
If not, How to initiate
Yes, it initiates an empty array and assigns it to MY_ARRAY. You could verify with something like this:
MY_ARRAY
#!/bin/bash declare -a MY_ARRAY=() echo ${#MY_ARRAY} # this prints out the length of the array