(b) For any positive integer MAX, what does this program do? (10%)

void abc(int *a, int i, int m)
{
int n, j;
if (i < m-1) {
for (j = i; j < m; j++) {
if (i != j) {n = a[i]; a[i] = a[j]; a[j] = n;}
abc(a, i+1, m);
if (i != j) {n = a[i]; a[i] = a[j]; a[j] = n;}
}
}
else {
for (j = 0; j < m; j++) printf("%d,",a[j]);
printf("\n");
}
}
void main()
{
int i, n = MAX, a[MAX];
for (i=0; i < n; i++) a[i] = i+1;
abc(a, 0, n);
}