It is my understanding that the c++ compiler will not allow you to initialize an array with a variable yet this program compiles and runs on my computer, why is that?
// this should not compile because there is a variable in the array declaration
#include <iostream>
int main(){
int x = 5;
int ar[x];
printf("hello world\n");
}