#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int arr[n]; //Variable length array
return 0;
}
Hey there, I've seen many people use variable length array in their programs but the problem is I program on Visual Studio and it doesn't allow me to use #include<bits/stdc++.h>. So I wanted to know which particular header file allows us to have variable length arrays.








It is not header files which allow you to do so, it actually depends on the compiler. Almost all Online Judges use GNU that supports variable length arrays.