title: When should I use ampersand with scanf()
body: <p>What are the rules for using ampersand in c while using <code>scanf()</code>?</p>
  
  <pre><code>struct Student 
  {
    char name[20];
    int id;
  };
  
  int main(void)
  {
    struct Student std1;
    printf("enter name and id of std1\n");
    scanf("%s %d", std1.name, &amp;(std1.id));
  }
  </code></pre>
  
  <p>Why for String do I not need to use the the ampersand and for <code>int</code> I have to use it?</p>
  
  <p>Is there a rule on when to use the ampersand sign? </p>