pre-increment and post-increment in C : <p>First of all, I would like to apologize, if this question has been asked before in this forum. I searched, but could't find any similar problem.</p>

<p>I am a beginner in C. I was going through a tutorial and came across a code, the solution of which I can't understand. </p>

<p>Here is the code - </p>

<pre><code>#include &lt;stdio.h&gt;
#define PRODUCT(x) (x*x)

int main()
{
    int i=3, j, k;

    j = PRODUCT(i++);
    k = PRODUCT(++i);

    return 1;
}
</code></pre>

<p>I tried running the code through compiler and got the solution as "j = 12" and "k = 49". </p>

<p>I know how #define works. It replace every occurrence of PRODUCT(x) by (x*x), but what I can't grasp is how j and k got the values 12 and 49, respectively. </p>

<p>Any help would be appreciated. </p>

<p>Thank you for your time.</p>
