ALL Test Case Fail why?

#include
using namespace std;
class node{
public:
int data;
node * left;
node * right;
node(int d){
data = d;
left = NULL;
right = NULL;
}
};
node * create_tree(int * arr , int s , int e){
if(s>e){
return NULL;
}
int mid = (s+e)/2;
node * root = new node(arr[mid]);
root->left = create_tree(arr , s , mid-1);
root->right = create_tree(arr , mid+1 , e);
return root;
}
void print(node * root){
if(root == NULL){
return;
}
cout<data<<" ";
print(root->left);
print(root->right);
}
int main() {
int n;
cin>>n;
while(n–){
int num;
cin>>num;
int arr[num];
for(int i = 0; i<num; i++){
cin>>arr[i];
}
node * root = create_tree(arr ,0 ,num-1);
print(root);

}
return 0;

}

here are a code and shows all test cases fail.
please resolve it .

Hey @rajsaxena.personal
what error it shows? also, can you post your code in coding blocks ide link?

It doesn’t shows any error although it compiled successfully but it didn’t pass any test cased , I don’t know why this is happened.

can you post your code in coding blocks ide link please?

Hey
it runs fine now, i guess…

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.