#include using namespace std; int main(){ int n=10; int a[n]; for (int i=0; i
This a a C99 feature called VLA which some compilers also allow in C++. It's allocation on stack, just as it would be with int a[10].
int a[10]