title: Example: scanf and char errors
body: <p>I am reading C for Dummies and am doing a example in the book. It told me to write it out line by line. Then it proceeds through the book even though the code has bugs. Here it is:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
  
  char me[20];
  printf("What is your name?");
  scanf("%s",&amp;me);
  printf("Darn glad to meet you. %s!\n".me);
  
  return(0);
  
  }  
  </code></pre>
  
  <p>According to gcc:</p>
  
  <blockquote>
    <p>WHORU.C: In function ‘int main()’: WHORU.C:8:19: warning: format ‘%s’
    expects argument of type ‘char*’, but argument 2 has type ‘char
    (*)[20]’ [-Wformat] WHORU.C:9:43: error: request for member ‘me’ in
    ‘"Darn glad to meet you. %s!\012"’, which is of non-class type ‘const
    char [28]’</p>
  </blockquote>
  
  <p>Because I am new to C, I can't really point out where I did wrong. I do know that this code requires input when it's executed. It's kinda like scanner in java.</p>
  
  <p>Thanks guys.</p>