title: What is wrong with this c language code?
body: <p>I've written this code to permute any number and the following error appears:
  In function 'int main()':
  invalid use of void expression</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  typedef unsigned long int uint;   
  uint t[11],n;
  
  void permute(uint k) {      
     uint i,c;
  
    if (1==k) {    
       for (i=n; i&gt;0; --i)
  
       printf("%d", t[i]);  
       printf("\n"); 
    } 
    else 
    {    
      permute(k-1);   
      for (i=1; i&lt;k; ++i)
      {   
        c=t[i]; t[i]=t[k]; t[k]=c;    
        permute(k-1);    
        c=t[i]; t[i]=t[k]; t[k]=c;}
      }
   }
  
   void run(uint x)
   {    
      n=0;
      while (x&gt;0)
      {    
         t[++n]=x%10;    
         x /= 10;
      }    
      permute(n);
  }
  
  int main () 
  {  
      printf ("%d\n",run(125)); 
  }
  </code></pre>