Breadth First Search in C