Question: This program should be written in the C language Write a program that declares a 2 dimensional array of chars with 3 rows and 3

This program should be written in the C language

Write a program that declares a 2 dimensional array of chars with 3 rows and 3 columns. Write functions called initializeBoard(), displayBoard(), and makeMove(). initializeBoard() should fill the array with space characters ( ), displayBoard() 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 Xs or a Os. Display the board again after each move. The program should run for 9 moves.

Use the following function prototypes:

void initializeBoard(char board[][3]);

void displayBoard(char board[][3]);

void makeMove(char board[][3], char player);

(TIP: use scanf(%d %d, &row, &column); use char board[3][3];)

The output should like the picture below

This program should be written in the C language Write a program

2I 3 Enter the row and column you'd like to fill:2 2 2 o] 3 1I Enter the row and column you'd 1ike to fill:3 3 2 I o] 3 [x Enter the row and column you'd like to fill:l 1 1 o 2 [o] 3 1 1[X

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!