title: 3d Matrix elements combinations
body: <p>I got this little project for school. I have a 3d matrix (char*** valueArray) which holds info (functions name, functions parameters, and parameters value)</p>
  
  <p>e.g. I have 3 functions</p>
  
  <pre><code>int fnc1(int a,long b,long c);
  
  void fnc2(char a, int b);
  
  void fnc3();
  </code></pre>
  
  <p>My matrix will hold the function number,the parameters, and the parameters value (each parameter has 3 values:minimum,0,maximum). If I want the info about fnc1, parameter 2, value 3 I will be using <code>valueArray[1][2][3]</code> and so on, basically the first number means what function it is,the second what parameter, and the third the value (min-0-max).</p>
  
  <p>The task: For every function display all the possible combinations created using the 3 parameters values.</p>
  
  <p>Something like this:</p>
  
  <pre><code>for fnc1,
  amin-bmin-cmin/
  amin-bmin-c0/
  amin-bmin-cmax/
  amin-b0-cmin/
  amin-b0-c0/
  amin-b0-cmax
  ........./amax-bmax-cmax
  </code></pre>
  
  <p>the indexes will be something like this</p>
  
  <pre><code>111 121 131 //new row// 
  111 121 132 // new row//
  111 121 133 //new row//
  111 122 131 //new row//
  111 122 132 //new row//
  111 122 133//new row//
  .....
  </code></pre>
  
  <p>The 3-for-3-print thing from below works perfect for a function with 3 parameters (because I use a print for every value) but I need it to work for every function, no matter how many parameters the function has and making a switch for every case is not an option because I don't know how many parameters will a function have (the teacher may put a function with 10 parameter just to test me).</p>
  
  <pre><code>for(i=0;i&lt;3;i++)
    for(j=0;j&lt;3;j++)
      for(k=0;k&lt;3;k++)
        printf("%s %s %s\n",valueArray[0][0][i],valueArray[0][1][j],valueArray[0][2][k]);
  </code></pre>
  
  <p>Can anyone give me some hints about how can I do this?</p>