title: What does the n stand for in `sscanf(s, "%d %n", &i, &n)`?
body: <p>The man page states that the signature of <code>sscanf</code> is</p>
  
  <pre><code>sscanf(const char *restrict s, const char *restrict format, ...);
  </code></pre>
  
  <p>I have seen an <a href="https://stackoverflow.com/a/456314/641514">answer on SO</a> where a function in which <code>sscanf</code> is used like this to check if an input was an integer.</p>
  
  <pre><code>bool is_int(char const* s) {
      int n;
      int i;
      return sscanf(s, "%d %n", &amp;i, &amp;n) == 1 &amp;&amp; !s[n];
  }
  </code></pre>
  
  <p>Looking at <code>!s[n]</code> it seems to suggest that we check if <code>sscanf</code> scanned the character sequence until the termination character <code>\0</code>. So I assume <code>n</code> stands for the index where sscanf will be in the string <code>s</code> when the function ends.</p>
  
  <p><strong>But what about the variable <code>i</code>? What does it mean?</strong></p>
  
  <p><strong>Edit:</strong></p>
  
  <p>To be more explicit: I see the signature of <code>sscanf</code> wants a pointer of type <code>char *</code> as first parameter. A format specifier as seconf parameter so it knows how to parse the character sequence and as much variables as conversion specifiers as next parameters. I understand now that <code>i</code> is for holding the parsed integer.</p>
  
  <p>Since there is  only one format specifier, I tried to deduce the function of <code>n</code>.</p>
  
  <p>Is my assumption above for <code>n</code> correct?</p>