Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!asuvax!mcdphx!quad4.UUCP!fredch From: fredch@quad4.UUCP (Fred Christiansen) Newsgroups: comp.lang.c Subject: Re: Explanation, someone?? Message-ID: <15047@mcdphx.phx.mcd.mot.com> Date: 26 Jun 91 19:33:16 GMT References: <33641@usc.edu> <1991Jun21.214346.19629@unislc.uucp> Sender: listen@mcdphx.phx.mcd.mot.com Reply-To: fredch@quad4.UUCP (Fred Christiansen) Organization: Motorola Microcomputer Division, Tempe, Az. Lines: 28 >From article <33641@usc.edu>, by burzin@skat.usc.edu (Burzin N. Engineer): >> Hi, >> I just gave an interview which had a C quiz .. Sounds like you interviewed at Microsoft (what they gave me was a tad diff). >> char *c[] = {"ENTER", "NEW", "POINT", "FIRST"}; >> char **cp[] = { c+3, c+2, c+1, c}; >> [Then, a bunch of cryptic ptr stuff] >> Another one is : >> char input[] = "SSSWILTECH1\1\11W\1WALLMP1"; >> [Switch inside a loop] When I taught at Portland State U a couple years back, these were precisely two of the questions on the final prepared by the previous adjunct prof. I felt that spending the time to run them thru such a beast as the first was probably ill spent as it was not "real life", IMHO. While the second is equally non "real life", it is simpler to understand...so I stole it 8-) and used variations on the theme on the finals I gave. Hmm, wonder where the original is from? The Obfuscated C Contest? -- Fred Christiansen | Email: fredch@phx.mcd.mot.com Motorola TSD (DW278) | or: uunet!phx.mcd.mot.com!fredch 2900 S. Diablo Way | Voice: 602-438-3464 Tempe, AZ 85282 | Fax: 602-438-3836 Contentment: Knowing that the more I release earthly possessions, the more I can grasp eternal treasures (cf. II Corinthians 4:18).