For this Question: Given an array A[] of size N containing non-negative integers. You have to move all 0's to the end of array while maintaining the relative order of the non-zero elements.

Note:
You must do this in-place without making a copy of the array.
Minimize the total number of operations.The first line of input line contains T, denoting the number of testcases. Each test cases contains 2 lines. First-line contains N, size of array. Second-line contains elements of array separated by space.

Constraints:
1 <= T <= 100
1 <= N <= 10^5
1 <= A[i] <= 10^5

<b>Sum of N over all testcases does not exceed 10^6</b>
For each testcase you need to print the updated array.Sample Input:
2
5
0 1 0 3 12
8
0 0 0 0 1 2 3 4

Sample Output:
1 3 12 0 0
1 2 3 4 0 0 0 0, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
    int n,k;
    cin>>n;
    int a[n];
    int cnt=0;
    for(int i=0;i<n;i++){
        cin>>a[i];\
        if(a[i]==0){cnt++;}
    }
    for(int i=0;i<n;i++){
        if(a[i]!=0){
            cout<<a[i]<<" ";
        }
    }
    while(cnt--){
        cout<<0<<" ";
    }
cout<<endl;
}
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?