// dynamically generate an array of a specified size in C #include<stdio.h> int main() { int i,n; printf("Please enter the size of the array:\n"); scanf("%d",&n); int Arr[n]; printf("Please enter the elements of the array:\n"); for (i=0; i<n; i++) { scanf("%d",&Arr[i]); } for (i=0; i<n; i++) { printf("%d",Arr[i]); } }Source:www.lautturi.com