Text Analysis/assign3.c
void cleanUp(char **bufferPtr, int numOfLines){
    if(bufferPtr != NULL){
        for(unsigned int i = 0; i < numOfLines; i++){
                free(bufferPtr[i]); //frees the allocated memory for each string in the array, ch12.2
        }
    }
}
/*
    cleanUp: free the memory allocated using malloc
    input: an array of text (bufferPtr), the number of lines to be analysed (numOfLines)
*/
free the memory allocated using malloc
input: an array of text (bufferPtr), the number of lines to be analysed (numOfLines)
free the memory allocated using malloc input : an array of text ( bufferPtr ) the number of lines to be analysed ( numOfLines )
void cleanUp(char **bufferPtr, int numOfLines){
    if(bufferPtr != NULL){
        for(unsigned int i = 0; i < numOfLines; i++){
                free(bufferPtr[i]); 
        }
    }
}
void cleanUp ( char * * bufferPtr , int numOfLines ) { if ( bufferPtr != NULL ) { for ( unsigned int i = 0 ; i < numOfLines ; i ++ ) { free ( bufferPtr [ i ] ) ; } } }
cleanUp: free the memory allocated using malloc
input: an array of text (bufferPtr), the number of lines to be analysed (numOfLines)
cleanUp : free the memory allocated using malloc input : an array of text ( bufferPtr ) the number of lines to be analysed ( numOfLines )
//frees the allocated memory for each string in the array, ch12.2