I want to print all of them
please can you correct me
#include <bits/stdc++.h>
using namespace std;
//https://www.geeksforgeeks.org/recursive-solution-count-substrings-first-last-characters/
void getRequired(char *in, int i, int j, char *out){
if(in[i]=='\0'){
return;
}
if(out[0]==out[j-1] && j-1>=0){
out[j]='\0';
cout<<out<<endl;
}
for(int k=i;in[k]!='\0';k++){
out[j] = in[k];
getRequired(in,i+1,j+1,out);
}
}
int main(){
char in[100];
cin>>in;
char out[100];
getRequired(in,0,0,out);
}