title: Pointer C Language
body: <p>i took this example from the deitel's book. Can you please explain how the string1 stores the whole strings?</p>
  <pre><code>#include &lt;stdio.h&gt;
  #define SIZE 80
  
  void mystery1(char *s1, const char *s2); // prototype
  
  int main(void)
  {
     char string1[SIZE]; // create char array
     char string2[SIZE]; // create char array
  
     puts(&quot;Enter two strings: &quot;);
     scanf(&quot;%79s%79s&quot; , string1, string2);
     mystery1(string1, string2);
     printf(&quot;%s&quot;, string2);
  } 
  
  // What does this function do?
  void mystery1(char *s1, const char *s2)
  {
     while (*s1 != '\0') {
        ++s1;
     } 
  
     for (; *s1 = *s2; ++s1, ++s2) {
        ; // empty statement
     } 
  }
  </code></pre>