int main(){
int size;
cin >> size;
int myArray[size];
return 0;
}
Is myArray
allocated on the stack? How so, if its size is unknown at compile time?
As an aside, is it possible to allocate a dynamically sized array on the stack?
These maybe bad practices but I'm asking if its allowed, not if its good practice or not.