dynamic memory allocation in c with arrays code example
Example 1: allocate memory c
ptr = (castType*)calloc(n, size);
Example 2: how to use malloc in c
int* a =(int*)malloc(sizeof(int))
ptr = (castType*)calloc(n, size);
int* a =(int*)malloc(sizeof(int))