Infosys interview question

Find length of array