title: Is there a difference in compiling/executing code in different Operational Systems?
body: <p>I have just found a problem and I have no idea what it could be. I started learning programming a few weeks ago and I am learning about pointers.</p>
  
  <p>I compiled exactly the same code in 2 different PC's. In the first, the program runs perfectly. In the second, it stops working when it reaches a certain line.</p>
  
  <p>I use 2 PC's.
  The one at my workplace runs Windows XP SP3. In this one, the program worked fine. </p>
  
  <p>The one at my home runs Windows 7 SP1. It compiled the code, but the program did not work. </p>
  
  <p>I am writing and compiling using DEV C++ and TDM GCC 5.1.0 in both systems.</p>
  
  <pre><code>#include&lt;iostream&gt;
  using namespace std;
  
  int main (void) {
    int* pointer;
    cout &lt;&lt; "pointer == "  &lt;&lt;  pointer &lt;&lt; "\n";
    cout &lt;&lt; "*pointer == " &lt;&lt; *pointer &lt;&lt; "\n"; // this is the line where the program stops. 
    cout &lt;&lt; "&amp;pointer == " &lt;&lt; &amp;pointer &lt;&lt; "\n";
  
  return 0;}
  </code></pre>
  
  <p>The output in the first computer was something like:</p>
  
  <pre><code>pointer == 0x000001234
  *pointer == some garbage value
  &amp;pointer == 0x000007865
  </code></pre>
  
  <p>In the second computer, it stops at second line.</p>
  
  <pre><code>pointer == 0x1
  </code></pre>
  
  <p>I do understand that the pointer have not been assigned to a variable. Therefore, it does not store any correct address. Even so, it should at least show the garbage value inside it, or a "0" to indicate it has not yet an address to point to. I know the code is right because it worked fine in the first PC. But I do not understand why it failed in other computer.</p>