Actually what you need to have is this:
recursive(str, ++k);
That allows the recursive algorithm to "progress". Of course it still doesn't actually print the permutations because your flip...
Type: Posts; User: nonpuz
Actually what you need to have is this:
recursive(str, ++k);
That allows the recursive algorithm to "progress". Of course it still doesn't actually print the permutations because your flip...
Yeah there seems to be a number of problems....you are running out the stack because the recursion never progresses, so eventually it simply segfaults because it can't locate the address of the...
Ok, well the point is you are trying to modify a STRING LITERAL. In C you can not modify a string when it is declared like this:
char * s = "string";
You can only modify a string that has been...
Define your string here:
char* cat = "cat";
Like this:
const char * cat = "cat";