title: Incrementing variable in printf()
body: <p>I was watching a tutorial online and did not fathom why we needed to use this:</p>
  
  <pre><code>printf("The value is 7: [ %d]\n",k++);
  </code></pre>
  
  <hr>
  
  <p>So, this is what I have:</p>
  
  <pre><code>int k = 6;
  k++;
  
  printf("The value is 7: [ %d]\n",k);
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>The value is 7: [ 7]
  </code></pre>
  
  <hr>
  
  <p>Now this is what he did:</p>
  
  <pre><code> int k = 6;
   k++;
  
   printf("The value is 7: [ %d]\n",k++);
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>The value is 7: [ 7]
  </code></pre>
  
  <p>This one too will print out 7:</p>
  
  <pre><code>int k = 6;
  
  printf("The value is 7: [ %d]\n",k++);
  printf("The value [%d]\n", k);
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>The value is 7: [ 6]
  The value [7]
  </code></pre>
  
  <p>My confusion was what is the importance of incrementing in <code>printf()</code> ?</p>