Web page hosting, cheap domain name & website promotion services
  

 Index

Next: , Previous: Escaped Newlines, Up: C Extensions



5.16 Non-Lvalue Arrays May Have Subscripts

In ISO C99, arrays that are not lvalues still decay to pointers, and may be subscripted, although they may not be modified or used after the next sequence point and the unary & operator may not be applied to them. As an extension, GCC allows such arrays to be subscripted in C89 mode, though otherwise they do not decay to pointers outside C99 mode. For example, this is valid in GNU C though not valid in C89:

     struct foo {int a[4];};
     
     struct foo f();
     
     bar (int index)
     {
       return f().a[index];
     }
 

 

  

 

Buy domain name or register domain | Buy cheap domain from 895cheap-domain.com 

Disclaimers: This document is provided as free service for the benefits of Active-Venture.com's virtual hosting customers only.

 

 

" If your computer speaks English, it was probably made in Japan.   "