For this Question: Implement Selection Sort on a given array, and make it sorted.First line of the input contains an integer, N, which denotes the length of the array. Next N inputs are elements of the array that is to be sorted in ascending order. 

Constraints
1<=N<=1000
-10000<=Arr[i]<=10000Sorted output where each element is space separatedSample Input:
3
3 1 2

Sample Output:
1 2 3, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
int main(){

  
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++){
    cin>>a[i];
}
sort(a,a+n);
for(int i=0;i<n;i++){
    cout<<a[i]<<" ";
}
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?