title: Why doesn't scanf need an ampersand for strings and also works fine in printf (in C)?
body: <p>I am learning about strings in C now.</p>
  
  <p>How come to use scanf to get a string you can do </p>
  
  <pre><code>scanf("%s",str1);
  </code></pre>
  
  <p>and for printf you can do</p>
  
  <pre><code>printf("The string is %s\n", str1);
  </code></pre>
  
  <p>I understand that for scanf it is because the string is just a character array which is a pointer, but for printf, how is it that you can just put the variable name just like you would for an int or float?</p>