I am Student interview question

Write a program to split the array.