title: Iterating through a 3d array
body: <p>I've been trying to use for loops to try to iterate and print out the array. When i try to print out i get these random numbers and i dont know where they are coming from. </p>
  
  <pre><code> const char segments[10][3][3] =
          {
                  {{' ', '_', ' '}, {'|', ' ', '|'}, {'|', "_", '|'}}, // segments for 0
                  {{' ', ' ', ' '}, {' ', '|', ' '}, {' ', "|", ' '}}, // segments for 1
                  {{' ', '_', ' '}, {' ', '_', '|'}, {'|', "_", ' '}}, // segments for 2
                  {{' ', '_', ' '}, {' ', '_', '|'}, {' ', "_", '|'}}, // segments for 3
                  {{' ', ' ', ' '}, {'|', '_', '|'}, {' ', " ", '|'}}, // segments for 4
                  {{' ', '_', ' '}, {'|', '_', ' '}, {' ', "_", '|'}}, // segments for 5
                  {{' ', '_', ' '}, {'|', '_', ' '}, {'|', "_", '|'}}, // segments for 6
                  {{' ', '_', ' '}, {' ', ' ', '|'}, {' ', " ", '|'}}, // segments for 7
                  {{' ', '_', ' '}, {'|', '_', '|'}, {'|', "_", '|'}}, // segments for 8
                  {{' ', '_', ' '}, {'|', '_', '|'}, {' ', "_", '|'}}, // segments for 9
          };
  
  
  for (int k = 0; k &lt; sizeof(segments); k++){
      for(int j = 0; j &lt; sizeof(segments); j++){
          for (int i = 0; i &lt; sizeof(segments); ++i) {
              printf("%c", segments[k][j][i]);
          }
      }
      printf("\n");
  }
  </code></pre>
  
  <p>When i run the code it gives me an output of something like this: </p>
  
  <p>|_| �| _ |_  �| _ |_ |�| _   | �| _ |_||�| _ |<em>| �|�#�z���Z��ث�|</em>| �| _ |_  �| _ |_ |�| _   | �| _ |_||�| _ |_| �|�#�z���Z��ث� �| _ |_  �| _ |_ |�| _   | �| _ |_||�| _ |_| �|�#�z���Z��ث� _ |_  �| _ |_ |�| _   | �| _ |_||�| _ |<em>| �|�#�z���Z��ث�|</em>  �| _ |_ |�| _   | �| _ |_||�| _ |_| �|�#�z���Z��ث� �| _ |_ |�| _   | �| _ |_||�| _ |_| �|�#�z���Z��ث� _ |_ |�| _   | �| _ |_||�| _ |<em>| �|�#�z���Z��ث�|</em> |�| _   | �| _ |_||�| _ |_| �|�#�z���Z��ث�|�| _   | �| _ |_||�| _ |_| �|�#�z���Z��ث� _   | �| _ |_||�| _ |_| �|�#�z���Z��ث�  | �| _ |_||�| _ |_| �|�#�z���Z��ث� �| _ |_||�| _ |_| �|�#�z���Z��ث�@ _ |_||�| _ |<em>| �|�#�z���Z��ث�@�Z|</em>||�| _ |_| �|�#�z���Z��ث�@�Z|�| _ |_| �|�#�z���Z��ث�@�Z _ |<em>| �|�#�z���Z��ث�@�Zұ4|</em>| �|�#�z���Z��ث�@�Zұ4Y �|</p>