Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!sunybcs!ubvms.cc.buffalo.edu!v067majp From: v067majp@ubvmsb.cc.buffalo.edu (John C Chu) Newsgroups: comp.lang.c Subject: Yet Another Basic C Question (about X[Y] equiv. Y[X]) Message-ID: <30198@eerie.acsu.Buffalo.EDU> Date: 9 Jul 90 16:42:18 GMT Sender: news@acsu.Buffalo.EDU Reply-To: chu@autarch.acsu.buffalo.edu Distribution: comp Organization: University at Buffalo Lines: 16 I'm in the middle of going through _Standard C_ by Plauger and Brodie. It says basically that where X is a pointer and Y is an integer that Y[X] is equivalent to X[Y] I've never seen the pointer used as the subscript before (then again I haven't seen alot of things) so I was wondering: Is it useful for anything? Is there some instance where it would make the code clearer? Or is it something that people use in the Obfuscated C Code contest? Or have I misread Plauger and Brodie? Reply by E-mail. It doesn't seem like a general interest thing. john chu@autarch.acsu.buffalo.edu