Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!purdue!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: "abcdef"[3] == 3["abcdef"], but why? Message-ID: <19941@mimsy.UUCP> Date: 2 Oct 89 21:53:11 GMT References: <781@cc.helsinki.fi> <19883@mimsy.UUCP> <519.nlhp3@oracle.nl> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 13 In article <519.nlhp3@oracle.nl> bengsig@oracle.nl (Bjorn Engsig) writes: >Article <19883@mimsy.UUCP> by chris@mimsy.UUCP (Chris Torek) explains >how the compiler could/does handle 3["abcde"]. This was very well done, >except that 3["abcde"] actually evaluates to the char 'd' and not 'c'. Oh my. How embarrassing. >I'm sure that Chris nows that C arrays start with index 0, right Chris :-) He does now :-) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris