Question 4.17 from the course text.
while (!Q.IsEmpty ()) S.Push (Q.DeQueue ()); while (!S.IsEmpty ()) Q.EnQueue (S.Pop ());