title: Question about format string in scanf function
body: <blockquote>
  <p>For each of the following pairs of <code>scanf</code> format strings, indicate whether or not the two strings are equivalent. If they're not, show how they can be distinguished:</p>
  <p>(b) <code>&quot;%d-%d-%d&quot;</code> versus <code>&quot;%d -%d -%d&quot;</code></p>
  </blockquote>
  <p>So in this case, my answer was that they were not equivalent. Because non-white-space characters except conversion specifier which start with <code>%</code>, cannot be preceded by spaces, it will not match with the non-white-space character. So in the first case, no spaces will be allowed after the first and second integer, while in the second case, any number of spaces will be allowed after the first 2 integers.</p>
  <p>But I saw that the book had a different answer. It said that they were both equivalent to each other.
  Is this the mistake of the book? Or am I just wrong with the concept of format string in the <code>scanf</code> function?</p>