title: Markov chain. Implementation add method
body: <p>I am a bit confused with the next statment in implementation:</p>
  
  <pre><code>void add(char *prefix[NPREF], char *suffix) {
      State *sp;
  
      sp = lookup(prefix, 1);
      //addsuffix(sp, suffix);
  
      printf("size of prefix %d",&amp;prefix);
      printf("size of prefix %s", prefix + 1);
      printf("size of prefix %d \n", &amp;prefix+1);
      for (int i = 0; i &lt; NPREF; i++)
          printf("%s \n" , prefix[i]);
  
  
      printf("memmove \n");
  
      memmove(prefix, prefix + 1, (NPREF - 1) * sizeof(prefix[0]));
      prefix[NPREF - 1] = suffix;
  
      for (int i = 0; i &lt; NPREF; i++)
          printf("%s \n", prefix[i]);
  
  }
  </code></pre>
  
  <p><strong>mmemove(prefix, prefix + 1, (NPREF - 1) * sizeof(prefix[0]));</strong></p>
  
  <p>So prefix is a pointer of type char. In this terms prefix + 1 is the link to the next char in the array, isn't it?</p>
  
  <p>How is it works in the right way? I've read about memmove and read about pointers but couldn't explore this add function behaviore for myself. </p>