Article View: comp.lang.c.moderated
Article #2329Re: Good C Interview questions?
From: Ari Lukumies
Date: Mon, 18 Mar 1996 13:51
Date: Mon, 18 Mar 1996 13:51
30 lines
1382 bytes
1382 bytes
Michael J. Creutz wrote: > > >: Chris Sonnack <cjsonnack@mmm.com> wrote: > >: >My personal favorite: > >: > > >: >Given: > >: > char* A = "hello" ; > >: > int i = 3 ; > >: > > >: >It's obvious that: > >: > > >: > A [i] == 'l' > >: > > >: >But what is: > >: > > >: > i [A] == ??? > > What's confusing about this? The "i'th element of A" is > about as intuitive as you can get. Only frustrated fortran > programmers would prefer the former :-). > You mean that i[A] is preferred to A[i] ? I don't agree. The standard makes the two identical, but I wouldn't want to maintain code using the latter approach. Well, maybe if you were coding Lisp... Later, AriL -- All my opinions are mine and mine alone.
Technical Details
Message-ID:
<4ijpo8$1hv@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailReferences:
<4h2s1m$l8@solutions.solon.com> <4h75c1$4nh@solutions.solon.com> <4hqebv$1k1@solutions.solon.com> <4hv081$jdt@solutions.solon.com> <4i80c9$49k@solutions.solon.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi> Newsgroups: comp.lang.c.moderated Subject: Re: Good C Interview questions? Date: 18 Mar 1996 07:51:04 -0600 Organization: Carelcomp Products Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4ijpo8$1hv@solutions.solon.com> References: <4h2s1m$l8@solutions.solon.com> <4h75c1$4nh@solutions.solon.com> <4hqebv$1k1@solutions.solon.com> <4hv081$jdt@solutions.solon.com> <4i80c9$49k@solutions.solon.com> NNTP-Posting-Host: solutions.solon.com X-Mailer: Mozilla 2.0 (WinNT; I)