Question: char **destroyMapBoard(char **board); Description: Free all dynamically allocated memory associated with board. You may assume this function receives a dynamically allocated 2D char array with

char **destroyMapBoard(char **board);

Description: Free all dynamically allocated memory associated with board. You may assume this function receives a dynamically allocated 2D char array with dimensions 8x8.

Output: This function should not print anything to the screen.

Return Value: This function must return NULL.

this is what I have so far with creating but now i have to add this

#include "IrmaMoves.h"

char **createMapBoard(void);

{ int [i][j], rows=8,columns=8; char **char2darray = (char **)malloc(rows * sizeof(char *)); for(i=0;i char2darray[i] = (char *)malloc(columns * sizeof(char));

for(i=0;i

for(j=0;j printf(" Enter charArray[%d][%d] : ",i,j); scanf("%s",&char2darray[i][j]); } } return char2darray; }

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 Programming Questions!