malloc vs calloc vs realloc code example
Example 1: difference between malloc and calloc and realloc
if (!(int *ptr = malloc(sizeof(int) * NUM_ELEM))){ // ERROR CONDITION HERE}
Example 2: how to use malloc in c
int* a =(int*)malloc(sizeof(int))