How does it internally work in case of compiler extensions? Will this still be called static compile time memory allocation?
int size;
cin>>size;
int arr[size];
How does it internally work in case of compiler extensions? Will this still be called static compile time memory allocation?
int size;
cin>>size;
int arr[size];
It's wrong because user input happens at runtime which is after compilation. Array variable size must be compile time constant in c++, which contradicts with the premise of runtime input.