dynamic memory allocation array code example
Example 1: c allocate array
int *array = malloc(10 * sizeof(int));
Example 2: c malloc array
#define ARR_LENGTH 2097152
int *arr = malloc (ARR_LENGTH * sizeof *arr);
int *array = malloc(10 * sizeof(int));
#define ARR_LENGTH 2097152
int *arr = malloc (ARR_LENGTH * sizeof *arr);