C++ Simple Decrement Using Pointers (puzzled)
<p>Im a little puzzled about this behaviour. Can Anyone Explain</p>

<pre><code>  void Decrement(int* x){
        *x--; //using this line, the output is 5 

        //*x=*x-1; //using this l ine, the output is 4

    }

    int main(){
        int myInt=5;
        Decrement(&amp;myInt);
        cout&lt;&lt;myInt&lt;&lt;endl;
        return 0;
    }

    Output: 5
</code></pre>
