The name of your C program file must be called ttt1.c, files with any other name will not be marked.
$ gcc -Wall ttt1.c -o ttt1 $ ./ttt1 Welcome to the game of Tic-Tac-Toe! Each square in the 3x3 board is numbered as shown: 0 | 1 | 2 ---+---+--- 3 | 4 | 5 ---+---+--- 6 | 7 | 8 Enter move for player X (0-8, anything else quits): 9 Thank you for playing tic-tac-toe. $ ./ttt1 Welcome to the game of Tic-Tac-Toe! Each square in the 3x3 board is numbered as shown: 0 | 1 | 2 ---+---+--- 3 | 4 | 5 ---+---+--- 6 | 7 | 8 Enter move for player X (0-8, anything else quits): 0 Valid move by player X at (0, 0). X . . . . . . . . Enter move for player O (0-8, anything else quits): 0 Invalid move by player O, (0, 0) is already occupied. Enter move for player O (0-8, anything else quits): 1 Valid move by player O at (0, 1). X O . . . . . . . Enter move for player X (0-8, anything else quits): 1 Invalid move by player X, (0, 1) is already occupied. Enter move for player X (0-8, anything else quits): 2 Valid move by player X at (0, 2). X O X . . . . . . Enter move for player O (0-8, anything else quits): 3 Valid move by player O at (1, 0). X O X O . . . . . Enter move for player X (0-8, anything else quits): 4 Valid move by player X at (1, 1). X O X O X . . . . Enter move for player O (0-8, anything else quits): 5 Valid move by player O at (1, 2). X O X O X O . . . Enter move for player X (0-8, anything else quits): 6 Valid move by player X at (2, 0). X O X O X O X . . Player X wins! $ ./ttt1 Welcome to the game of Tic-Tac-Toe! Each square in the 3x3 board is numbered as shown: 0 | 1 | 2 ---+---+--- 3 | 4 | 5 ---+---+--- 6 | 7 | 8 Enter move for player X (0-8, anything else quits): 0 Valid move by player X at (0, 0). X . . . . . . . . Enter move for player O (0-8, anything else quits): 1 Valid move by player O at (0, 1). X O . . . . . . . Enter move for player X (0-8, anything else quits): 2 Valid move by player X at (0, 2). X O X . . . . . . Enter move for player O (0-8, anything else quits): 3 Valid move by player O at (1, 0). X O X O . . . . . Enter move for player X (0-8, anything else quits): 5 Valid move by player X at (1, 2). X O X O . X . . . Enter move for player O (0-8, anything else quits): 4 Valid move by player O at (1, 1). X O X O O X . . . Enter move for player X (0-8, anything else quits): 7 Valid move by player X at (2, 1). X O X O O X . X . Enter move for player O (0-8, anything else quits): 6 Valid move by player O at (2, 0). X O X O O X O X . Enter move for player X (0-8, anything else quits): 8 Valid move by player X at (2, 2). X O X O O X O X X Player X wins! $ ./ttt1 Welcome to the game of Tic-Tac-Toe! Each square in the 3x3 board is numbered as shown: 0 | 1 | 2 ---+---+--- 3 | 4 | 5 ---+---+--- 6 | 7 | 8 Enter move for player X (0-8, anything else quits): 4 Valid move by player X at (1, 1). . . . . X . . . . Enter move for player O (0-8, anything else quits): 6 Valid move by player O at (2, 0). . . . . X . O . . Enter move for player X (0-8, anything else quits): 2 Valid move by player X at (0, 2). . . X . X . O . . Enter move for player O (0-8, anything else quits): 8 Valid move by player O at (2, 2). . . X . X . O . O Enter move for player X (0-8, anything else quits): 7 Valid move by player X at (2, 1). . . X . X . O X O Enter move for player O (0-8, anything else quits): 1 Valid move by player O at (0, 1). . O X . X . O X O Enter move for player X (0-8, anything else quits): 3 Valid move by player X at (1, 0). . O X X X . O X O Enter move for player O (0-8, anything else quits): 5 Valid move by player O at (1, 2). . O X X X O O X O Enter move for player X (0-8, anything else quits): 0 Valid move by player X at (0, 0). X O X X X O O X O Draw result. How boring. $
A total of 16 different hosts have accessed this document in the last 445 days; your host, nsrp-source.comp.nus.edu.sg, has accessed it 8 times.
If you're interested, complete statistics for this document are also available, including breakdowns by top-level domain, host name, and date.