how to free memory in c

C
int *example = NULL; //create pointer
example = malloc(sizeof(int)); //allocate memory
free(example); //deallocate memory
Source

Also in C: