title: Search/print specific elements in array
body: <p>Anyone know how to search (with luck) for specific elements in an array? I'v tried about everything - except the correct way.</p>
  
  <p>My two corresponding char-arrays looks something like this:</p>
  
  <pre><code>char array1[10][10]={"Alpha","Bravo","Charlie","Delta","Alpha2"};   //room for some more here
  char array2[10][10]={"123456","234567","345678","456789","567890"};   //room for some more here
  </code></pre>
  
  <p>I can print them all by the regular for-loop:</p>
  
  <pre><code>for (i=0;i&lt;10;i++){
      printf("%s  %s \n", &amp;array1[i], &amp;array2[i]);
  }
  </code></pre>
  
  <p>But let's say I want do the same loop, and only print the two elements starting with 'A' (the first and last one). I thought something like this would work</p>
  
  <pre><code>do {
      for (i=0;i&lt;10;i++){
          printf("Name: %s\nDate: %s\n\n", &amp;array1[i][x], &amp;array2[i]);
          }
      } while (x=='A');
  </code></pre>
  
  <p>That's the same for-loop, except I put the extra [x] behind &amp;array1 to tell my 'x' have to match the first character in each element of array1 (like it will only do the for loop while (x=='A') - which is the first letter in the elements I want.</p>
  
  <p>But it doesn't do any good.. </p>
  
  <p>Anyone have a better solution? I've tried other variants of the for loop also, without luck. I'm just stuck now...</p>