🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Good C Interview questions?

#2230
From: Marc Espie
Date: Sun, 10 Mar 1996 16:33
34 lines
1570 bytes
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).

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 ?

-- 
[nosave]<http://www.eleves.ens.fr:8080/home/espie/index.html>
microsoft network is EXPLICITLY forbidden to redistribute this message.
`Moon purismu powa, make up.... Tsuki ni kawatte, oshiokiyo !'
	Marc Espie (Marc.Espie@ens.fr)
Technical Details
Message-ID: <4hv081$jdt@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>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: espie@clipper.ens.fr (Marc Espie)
Newsgroups: comp.lang.c.moderated
Subject: Re: Good C Interview questions?
Date: 10 Mar 1996 10:33:05 -0600
Organization: Ecole Normale Superieure, Paris
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4hv081$jdt@solutions.solon.com>
References: <4h2s1m$l8@solutions.solon.com> <4h75c1$4nh@solutions.solon.com> <4hqebv$1k1@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com