title: How does printf() 'mysteriously' know what I intended to print?
body: <p>I forgot to add the accompanying variables to a printf() call.  How does printf() know what I want to print?</p>
  
  <pre><code>int successful = 0;//Flag
  printf("\nEnter a number to search for: ");
  scanf("%d", &amp;data);
  successful = search(list, data);
  successful? printf("\n'%d' was found\n\n", data) : printf("\n'%d' was NOT found\n\n");
  </code></pre>
  
  <p>The offending code is the final 'else' of the ternary expression on the last line.  I've ran it a few dozen times, and it always seems to print the correct argument in the output.</p>
  
  <pre><code>: printf("\n'%d' was NOT found\n\n");
  </code></pre>
  
  <p>How does this still work every time?</p>