array allocation in c# Programming - 葵花宝典
m*i
1 楼
#include
int main()
{
int n;
scanf("%d",&n);
int a[n];
int i;
for(i=0;i {
a[i] = i;
printf ("%d ",a[i]);
}
return 1;
}
This code work,
But the compiler only know how big the array on run-time....
how the compiler allocate the array on stack during compile time?
int main()
{
int n;
scanf("%d",&n);
int a[n];
int i;
for(i=0;i
a[i] = i;
printf ("%d ",a[i]);
}
return 1;
}
This code work,
But the compiler only know how big the array on run-time....
how the compiler allocate the array on stack during compile time?