implemented queue and array in C