comp.lang.ada
 help / color / mirror / Atom feed
From: "Tim Behrendsen" <tim@airshields.com>
Subject: Re: What's the best language to start with
Date: 1996/08/13
Date: 1996-08-13T00:00:00+00:00	[thread overview]
Message-ID: <01bb891c$0f2b34c0$87ee6fce@timpent.airshields.com> (raw)
In-Reply-To: 4up0ar$pim@news.ccit.arizona.edu


Frank Manning <frank@bigdog.engr.arizona.edu> wrote in article
<4up0ar$pim@news.ccit.arizona.edu>...
> In article <Pine.A32.3.91.960811134122.76393A-100000@wc.airshields.com>
> Tim Behrendsen <tim@airshields.com> writes:
> 
>   [ Bonus interview question ]
> 
> ----
> > You are writing a preprocessor program that takes C source as
> > its input.  The preprocessor replaces all variables and symbols
> > in the program with unique names of the form VARxxxxxx, where
> > "xxxxxx" is an incrementing decimal number.  Describe what is
> > needed to handle the case where the input source file already
> > contains a variable of that form.
> ----
> 
> OK, I'll bite. I'd say that particular case is handled just like any
> other case. The input variable/symbol is a completely separate entity
> from output string "VARxxxxxx" you replace it with, except for the
> 1:1 mapping of input vs. output strings. Examples:
> 
>    INPUT          OUTPUT
> 
>    abc            VAR000001
>    Color_Value    VAR000002
>    VAR000001      VAR000003
>    VAR000004      VAR000004
>    X_Prime        VAR000005
> 
> Nah...that was too easy. I musta missed something...

Nope, you got it. :)

The typical wrong answer (when they make an answer at
all) is to start describing a list they keep of the ones that
are already of the form, etc.  Occasionally I'll get someone
go off the deep end and describe incredibly elaborate data
structures.  Heh heh.

I don't count it too much, because it's so stacked to lead
the person down the wrong path.  "Trick" questions rarely
tell you anything significant, except where the "wrong"
answer is really confused.

-- Tim Behrendsen (tim@airshields.com)




  reply	other threads:[~1996-08-13  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <199608110535.WAA18572@pioneer.nevada.edu>
1996-08-11  0:00 ` What's the best language to start with Tim Behrendsen
1996-08-12  0:00   ` Hiring tests (Re: What's the best language to start with) Ray Blaak
1996-08-13  0:00   ` What's the best language to start with Frank Manning
1996-08-13  0:00     ` Tim Behrendsen [this message]
1996-08-15  0:00       ` Bob Kitzberger
1996-08-14  0:00   ` Robert Dewar
1996-08-14  0:00     ` Tim Behrendsen
1996-08-13  0:00 Alexander E. Kopilovitch
  -- strict thread matches above, loose matches on Subject: below --
1996-08-12  0:00 Alexander E. Kopilovitch
1996-08-11  0:00 ` Robert Dewar
1996-08-10  0:00 Alexander E. Kopilovitch
1996-08-10  0:00 ` Robert Dewar
1996-08-06  0:00 What's the best language to start with? [was: Re: Should I learn C or Pascal?] Tim Behrendsen
1996-08-07  0:00 ` What's the best language to start with Ian Ward
1996-08-08  0:00   ` Tim Behrendsen
1996-08-09  0:00     ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox