title: Forming a big array out of small ones
body: <p>I made the following function:</p>
  
  <pre><code>int * getMat(char x){
      int[2][2] returnValue;
      switch(x){
          case "0": returnValue = [0,0;0,0];
                  break;
          case "1": returnValue = [1,1;1,0];
                  break;
          .... 
          etc
      }
      return returnValue;
  }
  </code></pre>
  
  <p>In the main function, I have these vectors:</p>
  
  <pre><code> char a[] = "010110"
   int bigArray[100][2];
  </code></pre>
  
  <p>I need to populate bigArray[][] by iterating each char from a[], and adding the returned array from getMat() to bigArray.</p>
  
  <p>In other words, for the char sequence "010110", the bigArray should look like:</p>
  
  <pre><code>[0,0,1,1,0,0,1,1,1,1,0,0;
   0,0,1,0,0,0,1,0,1,0,0,0]
  </code></pre>
  
  <p>I'm stuck at this:</p>
  
  <pre><code>int bigArray[100][2];
  for(int i=0; i&lt;strlen(a); i++){
      int mat[2][2] = getMat(a[i]);
  
  }
  </code></pre>
  
  <p>Can someone help me with some tips? I can't figure out how to proceed.</p>