title: How to assign char * to character array?
body: <p>I have following code:</p>
  
  <pre><code>int main(){
  
      char sentence[] = "my name is john";
      int i=0;
      char ch[50];
      for (char* word = strtok(sentence," "); word != NULL; word = strtok(NULL, " "))
      {
          // put word into array
          //  *ch=word;
          ch[i]=word;
          printf("%s \n",ch[i]);
          i++;
  
          //Above commeted part does not work, how to put word into character array ch
      }
      return 0;
  }
  </code></pre>
  
  <p>I am getting error: error: <code>invalid conversion from ‘char*’ to ‘char’ [-fpermissive]</code>
  I want to store each word into array, can someone help?</p>