Why it was not working when the array was declared globally

at time 13:00 or around it , sir has to pass the array in main bcz it was not working when declared globally , why??

can you provide that code ? i will explain it.