title: When Exactly L-Value to R-Value Conversion Happens In C
body: <p>If an lvalue appears in a situation in which the compiler expects an rvalue, the compiler converts the lvalue to an rvalue.</p>
  
  <p>An lvalue e of a type T can be converted to an rvalue if T is not a function or array type. The type of e after conversion will be T. </p>
  
  <p>can someone tell when compiler expects Rvalue .or what is exaclty rules such that an expression reducuing to Lvalue is Converted into Rvalue. in C
  when we try to declare variable size array </p>
  
  <pre><code>  int b=8;
    int a[2*b];     //compiler gives error that constant expression reqd. what is this constant expression (is it rvalue expression)
  </code></pre>
  
  <p>but when i do    </p>
  
  <pre><code>int a[10];
   a[2*b]=89;
  </code></pre>
  
  <p>it gives no error plz someone elaborate when Lvalue to Rvalue Conversion Happens??  my Confusion is that in array subscript in first case it Lvalue to Rvalue convesion not happens (at declaration time)
  but in second case it happens</p>