Getting different results when dereferencing a pointer to an integer : <pre><code>#include&lt;stdlib.h&gt;
#include&lt;iostream&gt;

using namespace std;

void fun(int* a){
    int b=*a++;
    cout&lt;&lt;b&lt;&lt;endl;
}
void fun1(int *a){
    int b=*a+1;
    cout&lt;&lt;b&lt;&lt;endl;
}
int main(){
    int n=5;
    fun(&amp;n);//output remains 5
    fun1(&amp;n);//output incremented by 1
}
</code></pre>

<p>In the function fun the value of n does not get incremented when done as shown in the above code, on the other hand in function fun1 the value of n gets incremented by 1.What is the problem with the first approach to increment n?</p>
