Child and parent process execution is parallel and which starts first depends on OS scheduling. But what can be done to start child always before the parent?
Use a binary semaphore with initial value 0. After fork, parent should wait on the semaphore. After child starts, it can signal the semaphore (i.e., make it 1). Then, parent's wait would be over and it will progress.