title: Understanding arrays in Objective-C / C
body: <p>I just made my first steps moving into <a href="http://en.wikipedia.org/wiki/Objective-C" rel="nofollow noreferrer">Objective-C</a>. I have a very simple question about how arrays works.</p>
  
  <p>I have two .m files:</p>
  
  <p>1)</p>
  
  <pre><code>Line = origin[6];
  forloop(i...i++) {
      origin[i]=7;
  }
  [buildSubview:origin];
  </code></pre>
  
  <p>2)</p>
  
  <pre><code>Line response[6]; 
  
  -(id)buildSubview:(Line[])origin {
      *response=*origin;
      NSLog(@"response[1]=%o",response[1]);
      NSLog(@"origin[1]=%o",origin[1]);
      ........
      .....
  }
  </code></pre>
  
  <p>The output I get is:</p>
  
  <pre><code>response[1]=0; &lt;-- I would expect the same value as origin
  origin[1]=7;
  </code></pre>
  
  <p>But if I ask to print the value at index 0 I get what I expected:</p>
  
  <pre><code>response[0]=7; &lt;-- Now they are the same
  origin[0]=7;
  </code></pre>
  
  <p>I am asking why two different values ? And also, why if I write </p>
  
  <pre><code>response=origin;
  </code></pre>
  
  <p>I get an incompatible assignment compile error?</p>