Question: C code !!! Thanks for help Problem 1. Tic-Tac-Toe, Part 1 (20 points) Write a program that declares a 2 dimensional array of chars with
Problem 1. Tic-Tac-Toe, Part 1 (20 points) Write a program that declares a 2 dimensional array of chars with 3 rows and 3 columns. Write functions called initializeBoard0, displayBoard0, and makeMove0). initializeBoard0 should fill the array with space characters(, display Board0 should display the current board, with the rows and columns labled, and makeMove) should ask the user to enter a row and a column and change that square to alternating X's or a O's. Display the board again after each move. The program should run for 9 moves. Name your code as Hw5_q1 code.c Use the following function prototypes void initializeBoard(char board[][3]); void displayBoard(char board[II3); void makeMove(char board1131, char player); (TIP: use scant("%d %d", &row, &column); use char board[3113];) Example Hints, Inputs and Outputs: (purple texts are what the program should print on the screen to instruct the users, the black texts are what the users type in) 2 3I Enter the row and column you'd like to fil1:2 2 2 o] Enter the row and column you'd 1ike to fill:3 3 1 23 2 o] 3 [X] Enter the row and colm you'd like to fil1:1 1 1 [o) 2 1o)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
