Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ulowell!masscomp!ftw From: ftw@masscomp.UUCP (Farrell Woods) Newsgroups: comp.misc Subject: Re: Silly programming problems Message-ID: <984@masscomp.UUCP> Date: 18 Mar 89 22:39:17 GMT References: <817@krafla.rhi.hi.is> Reply-To: ftw@quasar.masscomp.UUCP (Farrell Woods) Organization: Concurrent Computer Corporation - Westford, Ma Lines: 24 In article <817@krafla.rhi.hi.is> frisk@rhi.hi.is (Fridrik Skulason) writes: >I am looking for some silly but difficult problems for use in a contest. I saw this once on a midterm exam given in a first-semester Pascal course. It was one of those "find all the syntax errors in the following program" deals. The same stunt can be applied in C as well. For sake of brveity, I've shortened the example: program foo(input, output) begin [ body of foo ] (* some miscellaneous comment in the middle of foo * ) (* which of course was obscured by other comments *) end. Aside from missing semi-colons, parens, quotes, etc. there was the space between the splat and close paren on that one line. It was rather subtle. -- Farrell T. Woods Voice: (508) 392-2471 Concurrent Computer Corporation Domain: ftw@masscomp.com 1 Technology Way uucp: {backbones}!masscomp!ftw Westford, MA 01886 OS/2: Half an operating system