title: Why the output of this C program is like this?
body: <p>Why the output of the following program is </p>
  
  <pre><code>x = 10 y = 18
  </code></pre>
  
  <p>?</p>
  
  <pre><code>int y;
  void fun(int x) {
   x+=2;
   y=x+2;
  }
  
  int main() {
   int x;
   x=10; y=11;
   fun(x);
   fun(y);
   printf("x=%d y=%d\n", x,y);
   return 0;
  }
  </code></pre>
  
  <p>Shouldn't the output be 10 and 11 ?</p>