Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!cmcl2!brl-adm!adm!dsill@NSWC-OAS.arpa From: dsill@NSWC-OAS.arpa (Dave Sill) Newsgroups: comp.lang.c Subject: Re: weird c code/ c test Message-ID: <8617@brl-adm.ARPA> Date: Mon, 3-Aug-87 10:02:05 EDT Article-I.D.: brl-adm.8617 Posted: Mon Aug 3 10:02:05 1987 Date-Received: Tue, 4-Aug-87 06:13:48 EDT Sender: news@brl-adm.ARPA Lines: 33 Thomas J Keller wrote: > I just had a strange experience today. I went to see a head hunter about >an opening she wanted me to consider, and she popped this "C test" on me. >Most of it was pretty straight forward, but the last question on the test >was a **BITCH**. See if you can determine the output of this program >without actually compiling it: > > [code deleted] > > I do question this as a test, however. That is some pretty esoteric >pointer manipulation there! What do you think? Deja vu (dang! no French characters on this keyboard). Unless I'm mistaken, this "test" was taken from "The C Puzzle Book" by Alan Feuer. Yes, I must say that I think makes an unfair test. If I came across a piece of code like that, I wouldn't even attempt to try to figure it out without at least referring to K&R. Most likely, I'd use cdecl to explain the declarations if it was handy. I guess you're lucky they didn't get their hands on the Obfuscated C Contest winners :-) While I'm here, I'd like to move that the following topics be made taboo for the next say, 10 years: 1) definition of NULL, 2) definitions of TRUE and FALSE, and 3) "structured" or "goto-less" programming. Perhaps the introduction to info-c should briefly mention them so beginners won't need to post to the entire list (and instigate a two-month-long debate). -Dave Sill dsill@nswc-oas.arpa