🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2244

Re: Good C Interview questions?

#2244
From: Dale Johannesen
Date: Tue, 12 Mar 1996 01:27
32 lines
1622 bytes
In article <4hv081$jdt@solutions.solon.com>, espie@clipper.ens.fr (Marc Espie) writes:
|> In article <4hqebv$1k1@solutions.solon.com>,
|> 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] == ???
|> 
|> >Any competent C programmer should know.
|> 
|> Any *competent* C programmer should know ??? Come on, have you *ever*
|> seen this weird construct used outside of the IOCCC ?
|> (Maybe this is a serious question... As for me, I don't remember having
|> ever seen it elsewhere).

It also appears in test suites for compilers.  IMO your overall point
is well taken, however.

|> What is its incidence on reality, as defined by programs written to accomplish
|> something and not to obfuscate ? Knowing the symetry of C arrays is fun,
|> but there are loads and loads of more useful things that a C programmer
|> should know first and foremost. Why not consider trigraph knowledge a must
|> as well ?
Technical Details
Message-ID: <4i2ju9$8gs@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: <4h2s1m$l8@solutions.solon.com> <4h75c1$4nh@solutions.solon.com> <4hqebv$1k1@solutions.solon.com> <4hv081$jdt@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: dale@hal.com (Dale Johannesen)
Newsgroups: comp.lang.c.moderated
Subject: Re: Good C Interview questions?
Date: 11 Mar 1996 19:27:37 -0600
Organization: HAL Computer Systems, Inc.
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4i2ju9$8gs@solutions.solon.com>
References: <4h2s1m$l8@solutions.solon.com> <4h75c1$4nh@solutions.solon.com> <4hqebv$1k1@solutions.solon.com> <4hv081$jdt@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com