#include <stdio.h>
#include <stdlib.h>
int main() {
// Dynamic array allocation
int *dynamicArray;
int size;
printf("Enter the size of the array: ");
scanf("%d", &size);
dynamicArray = (int *)malloc(size * sizeof(int));
if (dynamicArray == NULL) {
printf("Memory allocation failed.\n");
return 1;
}
// Use the dynamically allocated array
// Free the allocated memory
free(dynamicArray);
return 0;
}