This is my code, its a simple code block for permutation:
void arrange(char c[], int N, int start)
{
if (start == N)
{
print(c, N);
return;
}
for (int i = start; i < N; i++)
{
swap(c[start], c[i]);
arrange(c, N, i + 1);
swap(c[start], c[i]);
}
}
int main(int argc, char const *argv[])
{
char c[] = { 'A','B','C' };
int N = (sizeof(c) / sizeof(char));
arrange(c, N, 0);
return 0;
}
Its not giving the output I expect and I wanted to debug this code. I wanted to observe the character swaps in the input array. But when I debug, the input array cannot be expanded.



c,10or however many entries you want to display.chars, memory window shows exactly what you want.cin functionarrangeis not an array. It is just a pointer tochar.