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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started