title: What is difference between char name[11]; and char *name;
body: <p>Belows are simple code to find what the pointer to array is.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  typedef unsigned short int Ushort;
  
  void InputYear(char (*name), Ushort *year);
  
  int main(int argc, const char * argv[]) {
      Ushort year;
      char name[11] ;    
  
      InputYear(name, &amp;year);
  
      printf("MY name is %s", message);
      printf("%d", year);
  }
  
  void InputYear(char (*name), Ushort *year){
      printf("please enter your name and year");
      scanf("%s %hd" ,name, year);
  }
  </code></pre>
  
  <p>But question is, why it doesn't work if i change <code>char name[11]</code> --> <code>char *name</code> ?</p>
  
  <p>The error is "segmentation fault : 11".  </p>
  
  <p>I learned that the name of array is also a pointer that indicates the address of first array value. In this respect, I think that <code>char name[11]</code> and <code>char *name</code> are same. </p>
  
  <p>Or is there anything that I didn't know about it?</p>
  
  <p>and Extra Question : </p>
  
  <pre><code>int a = 1;
  int* b = &amp;a;
  printf("%s", *b);
  </code></pre>
  
  <p>it works. The point is that second argument of printf is the value itself, not address. but,</p>
  
  <pre><code>char hi[11] = "message";
  printf("%s", hi);
  </code></pre>
  
  <p>in this case, second argument of printf is address itself, not value like above. What is it?? why does it happen?</p>
  
  <p>Thanks you so much!</p>