What should i put after return in line 5 for the code to run

#include
using namespace std;
int printall(int*a,int n,int i,int key){
if (i==n){
return ;
}
if( a[i]== key){
cout<<i<<" ";
}
return printall(a,n,i+1,key);

}
int main() {
int n,key;
int i;
int a[n];
cin>>n;
for(int i=0;i<n;i++){
cin>>a[i];
}
cin>>key;
cout<<printall(a,n,0,key);
return 0;
}

hi @abhigyankumar09 updated

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.