I need to free memory before the program terminates . The function takes 2D dynamic strings function is : void cleanUp(char ** nouns, char ** verbs, char ** adjectives, char ** prepositions, char ** articles, int nounsize, int verbsize, int adjsize, int prepositionsize, int articlesize); I believe I need to use a loop and obviously the free calls but I am not sure how to write them : I just have them set up this way for now? Where should I put a loop ( if I am even right with this ) free(nouns); free(verbs); free(adjectives); free(prepositions); free(articles); free(nounsize); free(verbsize); free(adjsize); free(prepositionsize); free(articlesize);
I need to free memory before the program terminates . The function takes 2D dynamic strings
function is :
void cleanUp(char ** nouns, char ** verbs, char ** adjectives, char ** prepositions, char ** articles, int nounsize, int verbsize, int adjsize, int prepositionsize, int articlesize);
I believe I need to use a loop and obviously the free calls but I am not sure how to write them :
I just have them set up this way for now? Where should I put a loop ( if I am even right with this )
free(nouns);
free(verbs);
free(adjectives);
free(prepositions);
free(articles);
free(nounsize);
free(verbsize);
free(adjsize);
free(prepositionsize);
free(articlesize);
Introduction:
We have to talk about the function that is shown that whether it is correctly working or not.
Step by step
Solved in 2 steps with 1 images