Karin
2
Q:

how to free memory in c

ptr = (cast-type*) malloc(byte-size)
0
int *example = NULL; //create pointer
example = malloc(sizeof(int)); //allocate memory
free(example); //deallocate memory
-1

New to Communities?

Join the community