Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!elbereth.rutgers.edu!ron.rutgers.edu!ron From: ron@ron.rutgers.edu (Ron Natalie) Newsgroups: comp.lang.c Subject: Re: What does Z["ack"] = 5 mean? Keywords: Obfuscated C, wierd Message-ID: Date: 5 Oct 88 21:19:54 GMT References: <14999@agate.BERKELEY.EDU> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 29 You're program is bogus only in the fact that Z is not set to anything before it is referenced. Automatic variables are NOT guaranteed to be set to zero. A[B] is equivelent to *(A+B) This means that in programs like: char a[10]; int b; b = 1; a[b] = '5'; b[a] = '5'; The last two lines are equivelent. Note that strings are just character arrays. So you can do "FOOBAR"[3] = 'E'; or even 3["FOOBAR"] = 'E'; Although it's not clear to me what modifying a string like that is because your example doesn't show you storing a pointer to that string anywhere and hence it is not going to be able to be referenced again. -Ron