title: Java vs C output
body: <p>This might seem simple but it's just stumbled me and my friends...</p>
  
  <p>lets take the following piece of code-
  in java</p>
  
  <pre><code>//........
  
  int a=10;
  a= a-- + a--;
  System.out.print("a="+a);
  //........
  </code></pre>
  
  <p>in c</p>
  
  <pre><code>//........
  
  int a=10;
  a= a-- + a--;
  printf("a= %d",a);
  //.......
  </code></pre>
  
  <p>where in the former case you get output as 19 in C you get it as 18.
  the logic in c is understandable but in java?</p>
  
  <p>in java if its like </p>
  
  <pre><code>int a=10;
  a=a++;
  </code></pre>
  
  <p>in this case the output is 10.</p>
  
  <p>So what's the logic?</p>