Following code compiles fine since g++ allows it , but will it cause undefined behavior ? Or my code will work fine ? what does it mean that c++ standard disallows variable length array if no error is generated on using it ?
#include <iostream>
using namespace std;
int main()
{
int x;
cin >> x;
char abc[x];
cout << sizeof(abc) << "\n";
return 0;
}