title: How to pass char into function?
body: <p>I want to randomise my string so this is my code.</p>
  
  <pre><code>while(strcmp(word,"END")!=0)
  {
  printf("Enter word");
  fgets(input,sizeof(input),stdin);
  sscanf(input,"VERTEX %s",key1);
  strcpy(list[count],key1);
  count++;
  }
  random(list);
  </code></pre>
  
  <p>I declare list and key1 as <code>char list[32],key1[32];</code>
  Then I tried to pass it into this function</p>
  
  <pre><code>void random(char* list)
  {
      int i = rand()%5;
      char key1[32];
      printf("%d",i);
      printf("%s",list[i]);
      strcpy(key1,list[i]);
  }
  </code></pre>
  
  <p>but it gave me this warning</p>
  
  <pre><code>incompatible integer to pointer conversion passing 'char'
    to parameter of type 'char *'
  </code></pre>
  
  <p>And it can't print. Any suggestion?</p>