🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Good C Interview questions?

#2206
From: Chris Sonnack
Date: Fri, 08 Mar 1996 23:03
28 lines
1132 bytes
Ari Lukumies (aril@cmt.lpr.mail.carel.fi) wrote:

> char	xxx(int n)
> {
> 	return "0123456789ABCDEF"[n];
> }

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.

--
Chris Sonnack  <cjsonnack@mmm.com>                  http://eishcq.mmm.com
Engineering Information Services/Information Technology/3M, St.Paul, Minn
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An intellectual is someone whose mind watches itself
Technical Details
Message-ID: <4hqebv$1k1@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: <4h2s1m$l8@solutions.solon.com> <4h75c1$4nh@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: cjsonnack@mmm.com (Chris Sonnack)
Newsgroups: comp.lang.c.moderated
Subject: Re: Good C Interview questions?
Date: 8 Mar 1996 17:03:27 -0600
Organization: 3M/IT/EIS (St.Paul,MN 55144)
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4hqebv$1k1@solutions.solon.com>
References: <4h2s1m$l8@solutions.solon.com> <4h75c1$4nh@solutions.solon.com>
Reply-To: cjsonnack@mmm.com (Chris Sonnack)
NNTP-Posting-Host: solutions.solon.com
X-Newsreader: TIN [version 1.2 PL2]