大家帮忙看看这个程序,是什么意思?

#include <stdio.h> 

int n = 0; 

void swap(int *a, int *b) 替换函数
{    
    int m;    
    m = *a;    
    *a = *b;    
    *b = m;

void perm(int list[], int k, int m)
{   
    int i;    
    if(k > m)    
    {         
        for(i = 0; i <= m; i++)            
            printf("%d ", list[i]);        
        printf("\n");        
        n++;    
    }    
    else    
    {        
        for(i = k; i <= m; i++)        
        {            
            swap(&list[k], &list[i]);            
            perm(list, k + 1, m);            
            swap(&list[k], &list[i]);        
        }    
    }
}
int main()
{    
    int list[] = {5,1,2,36,8};    
    perm(list, 0, 4);    
    printf("%d", list);  
printf("\n");
return 0;}

输出结果为附件。