Compiler answer confusion!

the code below gives me the same answer in online compiler but in coding blocks it printing some address of garbage value i suppose.

#include
#include <bits/stdc++.h>
using namespace std;

int main() {
int n;
cin>>n;
int num=0;
int arr[n+10];
int brr[n+10];
int crr[100];
int alt;
for(int i =0;i<n;i++){
cin>>arr[i];
}
for(int i=0;i<n;i++){
num ^=arr[i];

}
int check=0;
while(num&1!=1){
	check++;
	num>>1;
}
int m=0;
for(int i=0;i<n;i++){
	int dumb =arr[i];
	dumb>>check;
	if(dumb&1==1){
		brr[m] = arr[i];
		m++;
	}
}
alt =num;
for(int i=0;i<m+1;i++){
	num ^=brr[i];
}
crr[0]=num; 

num ^=alt;
crr[1]=num;

sort(crr,crr+2);
cout<<crr[0]<<" "<<crr[1];






return 0;

}

consider the ans of online compiler as correct
because code blocks compiler have some issues many other student also get random answer or output of previously run code

so i won’t get any points for my code then.

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.