Q:

C - memset vs free

I am confused on what actually happens in memory when memset is called versus what happens when you call free. 
For example I have a pointer A that points to an array of char*'s
char** A = (char**)calloc(5, sizeof(char*));
int i;
for(i=0;i<5;i++)
{
  //filling
  A[i] = (char*)calloc(30, sizeof(char)); 
  scanf("%s", &A[i]);
}

now I want to reset it my char** pointer and all the elements
it points to be completely empty
memset(A, 0, 5);

or
free(A);

what is the difference?
I am somewhat new to C so please speak in layman's terms thank you

A:

The difference is that memset actually sets the value of a block of memory, while free returns the memory for use by the operating system.  
By analogy using physical things, memset(beer, 0, 6) applied to a six-pack of beer would apply the value of '0' to all six members of the array beer, while free(beer) would be the equivalent of giving the six-pack away to a friend.

A:

The memset function sets an area of memory to the requested value. Do note that the size you provide is the number of bytes.
The free function releases the allocated memory so it can't be used anymore. Calling free doesn't usually modify the memory in any way. Using the memory after calling free leads to undefined behavior.

A:

Both approaches are incorrect, but somewhat complementary.
memset will set the content of the buffer to the given value, 0 in your case. This will change the value of the pointers, which will cause you to lose the references to the allocated buffers (in each A[i]).
free(A) will release the buffer pointed by A, but this buffer contains pointers, and each of the buffers that is pointed by them will not be freed.
in short - memset does not free a dynamically allocated buffer, and free does not set it to zero.
A correct approach will be something like that:
for(i=0;i<5;i++)
{
    // complementary to
    // A[i] = (char*)calloc(30, sizeof(char)); 
    free(A[i]);
}
// complementary to
// char** A = (char**)calloc(5, sizeof(char*));
free(A);
A = NULL; // so no one gets confused...

