title: How to create an array of 100 random strings in C
body: <p>I'm trying to create an array of 100 strings of random sizes between 3 and 10 letters long in C but I'm having a bit of trouble. This is what I have so far...</p>
  
  <pre><code>int main() {
      int count, number;
      char *randomWord[100]; // 1-d array of pointers to char
      char randomLetter;
      int wordLength;
  
      // generate 100 strings or random sizes between 3 and 10 letters
      for (count = 0; count &lt; 100; count++) {
          wordLength = ((rand() % 10) + 3);  // get random size of word
          randomWord[count] = malloc(wordLength + 1); // allocated space for word
          for (number = 1; number &lt; wordLength; number++) {
              randomLetter = 'A' + (rand() % 26);
              //randomWord[count] =
              printf("%d\n", randomLetter);
          }
  
          printf("%d\n", &amp;randomWord[count]);
      }
  }
  </code></pre>
  
  <p>The output I get looks like this...</p>
  
  <pre><code>72
  90
  82
  73
  87
  75
  66
  65
  6356712
  88
  66
  71
  70
  67
  66
  67
  69
  89
  72
  74
  6356716
  71
  73
  88
  87
  6356720
  </code></pre>
  
  <p>Any help or direction would be appreciated.</p>