Passing function as argument

Why bool (&cmp)(int a,int b) ???

shouldn’t it be bool (*cmp) (int a ,int b)…

@pratibha_jaggi its syntax &cmp is right

??? when we pass a function…we are passing the address…then have to store it in a pointer variable only …Mine is working fine with bool (*cmp) (int a, int b)…

@pratibha_jaggi share your code here

#include
using namespace std;

bool compare(int a,int b){
return a < b;
}

void bubbleSort(int arr[],int n, bool (*cmp) (int a, int b)){
for(int itr=1;itr<=n-1;itr++){
for(int j=0;j<n-itr;j++){
if(cmp(arr[j],arr[j+1])){
swap(arr[j],arr[j+1]);
}
}
}
return;
}

int main(){

int arr[1000];

int n;
cin>>n;

for(int i=0;i<n;i++){
	cin>>arr[i];
}


bubbleSort(arr,n,compare);
for(int i=0;i<n;i++){
	cout<<arr[i];
}
return 0;

}

@pratibha_jaggi yes * is also working . & logic was (its a way of passing by ref so it works)