why can we do this in c?
int n; scanf(\"%d\",&n); int a[n];
I thought array is located memory during load time but seems like the above
I am no expert in C, but this could be a variable-length array as added by C99 and supported by GCC, for example. GCC allocates the memory for such array on stack, so that it gets automatically freed when you return from the function.