10[25]==35? Really?

Dave P. Schaumann dave at cs.arizona.edu
Tue Feb 26 00:56:50 AEST 1991


In article <25694 at netcom.COM> avery at netcom.COM (Avery Colter) writes:
>With all this about the #define X1 -10, I find it interesting that
>indexing a constant yields the sum of the constant and the number inside
>the brackets.
>
>I could RTFM till the cows come home and never would have gleaned this.

Well, if you would RTF code, you would've seen an initialization loop
that looked something like this:

  for( i = 0 ; i < N ; i++ ) p[i] = i ;

(That's probably not exactly what was in the code, but you get the idea.)

Just another tricky day for you...

-- 
Dave Schaumann      | Is this question undecidable?
dave at cs.arizona.edu |



More information about the Comp.lang.c mailing list