C language to achieve tic-tac-toe