title: How to test the rules of undefined behavior in respect to sequence point?
body: <p>I am reading about UB from 2 days and a confusion is growing in my mind about the following example</p>
  
  <pre><code>int a=5;
  a++ &amp; printf("%d",a);//i know that `&amp;` introduced here is not a sequence point.
  </code></pre>
  
  <p>Now,it is UB in c but i am looking at it from a different angel as following </p>
  
  <p>now c standard says </p>
  
  <p><code>Between the previous and next sequence point an object shall have its stored value modified at most once by the evaluation of an expression.</code></p>
  
  <p>So,as we are modifying the value of a by writing <code>a++</code> only once,this rule fails in declaring the behavior as UB.<br>
  But further it states that </p>
  
  <p><code>Furthermore, the prior value shall be accessed only to determine the value to be stored.</code>  </p>
  
  <p>As the prior value of <code>a</code> ( 5 here ) is accessed via <code>a++</code> to write the value of <code>a</code> .But in the statement <code>printf("%d",a)</code></p>
  
  <p><code>("%d",a)</code> is a full expression.so <code>all the dust of side effect should be settled down</code> before the expression runs.<br>
  As according to standard  </p>
  
  <p><code>when a function call is made there is sequence point before the actual call and after the evaluation of arguments.</code></p>
  
  <p>so <code>a</code> should have been modified here in the function call,more precise to say that value of <code>a</code> is updated according to the standard.<br>
  Then why it is yet UB as <code>("%d",a)</code> is an expression in itself and it is evaluated before <code>;</code>?</p>