SAP Interview Question

write a program to keep all the non zero elements in the front and and zero's in the last in an array without changing the sequence of non zero elements(one pass)