Permuations backtracking

can u check the backtracking steps
#include
using namespace std;

void permute(char *in, char *out, int i, int j) {
if (in[i] == ‘\0’) {
out[j] = ‘\0’;
cout << out << endl;
return;
}

for (int k = i; in[k] != '\0'; k++) {
	swap(in[i], in[k]);
	out[j] = in[i];
	permute(in, out, i + 1, j + 1);
	out[j] = in[i];
}
return;

}

int main() {
char in[100];
cin >> in;
char out[100];
permute(in, out, 0, 0);
return 0;
}

what is the problem that u are facing???

share code in cb ide if u have problem

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.