title: generate random words from the list of words in c programming
body: <p>hey, i wanna ask if i have a list of words let say 'tiger, lion, elephant, zebra, horse, camel, deer, crocodile, rabbit, cat'
  haw can i generate 5 words out of the list randomly in c programming?
  for example:</p>
  
  <p>tiger, zebra, cat, deer, horse</p>
  
  <p>or</p>
  
  <p>crocodile, rabbit, camel, zebra, elephant</p>
  
  <p>ect </p>
  
  <p>thank you in advance :D</p>
  
  <p><strong>Edit</strong>:</p>
  
  <pre><code>#include &lt;stdio.h&gt; 
  #include &lt;string.h&gt;
  
  #define SIZE 10 
  
  int main () 
  { 
  
  char arr2[SIZE][20] = { "tiger", "lion", "elephant", "zebra", "horse", "camel", "deer", "crocodile", "rabbit", "cat" }; 
  
  int x = 0; 
  srand(time(NULL));
  
  while (x &lt; SIZE - 5) 
  { 
      arr2 [x][20] = rand (); 
      printf ("%s\n", arr2[x]); 
      x++; 
  }
  
  system ("pause"); 
  return 0; 
  }
  </code></pre>