Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Order of operations, as presented:</p> <ol> <li><code>a</code> is globally initialized on startup. to 7</li> <li>Initializer of for-loop is hit first, <code>test()</code> decrements <code>a</code> to 6, then returns the prior value (7), which is ignored. </li> <li>The test case of for-loop is hit, <code>test()</code> decrements <code>a</code> to 5, then returns the prior value (6) which passes the non-zero test so the for-loop can continue.</li> <li>The <code>cout</code> statement; <code>test()</code> decrements <code>a</code> to 4, returning the prior value <strong>(5)</strong> which is sent to <code>cout</code>.</li> <li>The increment-statement of the for-loop is executed. <code>test()</code> decrements <code>a</code> to 3, returning the prior value (4), which is ignored.</li> <li>The test case of the for-loop is hit. <code>test()</code> decrements <code>a</code> to 2, returning the prior value (3), which passes the non-zero test and the loop continues.</li> <li>The <code>cout</code> statement; <code>test()</code> decrements <code>a</code> to 1, returning the prior value <strong>(2)</strong> which is sent to <code>cout</code>.</li> <li>The increment-statement of the for-loop is executed. <code>test()</code> decrements <code>a</code> to 0, returning the prior value (1), which is ignored.</li> <li>The test case of the for-loop is hit. <code>test()</code> decrements <code>a</code> to -1, returning the prior value (0), which fails the non-zero test and the loop terminates.</li> </ol> <p>Now. Start that loop at 6 or 8 and see what happens. =P</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload