From: frank@bigdog.engr.arizona.edu (Frank Manning)
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: <4up0ar$pim@news.ccit.arizona.edu> (raw)
In-Reply-To: Pine.A32.3.91.960811134122.76393A-100000@wc.airshields.com
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...
-- Frank Manning
next prev parent 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 ` Frank Manning [this message]
1996-08-13 0:00 ` What's the best language to start with Tim Behrendsen
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