title: Understanding Pass-By-Value-Result
body: <p>Consider the following program</p>
  
  <pre><code>int i;
  int a[2];
  void foo(int x, int y)
  {
      x++;
      i++;
      y++;
  }
  
  main()
  {
      a[0] = 1;
      a[1] = 1;
      i = 0;
      foo(a[i], a[i]);
      print(a[0]);
      print(a[1]);
  }
  </code></pre>
  
  <p>I'm trying very hard to understand pass-by-value-result. However couldn't get the hang of it. I know it's similar to pass-by-reference. But in what way? How does the results differ in the above case? When does it actually use the "reference" of the values? </p>