How can I dynamically allocate the size of an arry at runtime
When I am doing this am getting an error..
#include<conio.h>
#include<stdio.h>
void main()
{
int n;
a[n];
clrscr();
printf("Enter no of your array\n");
scanf("%d",&n);
printf("Enter your array");
for(int i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
{
printf("%d\n",a[i]);
}
}