Xref: utzoo misc.jobs.offered:2436 comp.lang.c:19362 Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!ames!sun-barr!sun!imagen!atari!portal!cup.portal.com!Tim_CDC_Roberts From: Tim_CDC_Roberts@cup.portal.com Newsgroups: misc.jobs.offered,comp.lang.c Subject: Re: 1000 lines of C a week? Message-ID: <19436@cup.portal.com> Date: 13 Jun 89 16:15:33 GMT References: <15526@pollux.UUCP> <18783@vax5.CIT.CORNELL.EDU> Distribution: na Organization: The Portal System (TM) Lines: 31 In <18783@vax5.CIT.CORNELL.EDU>, sc2y@vax5.cit.cornell.edu asks with tongue in cheek: >>A project needs a person with a proven capability of generating >>a thousand lines of debugged C a week. > >Okay, how about this? > > /* compute square root of a number if less than 1000 */ > float comp_sqrt(x) > int x; > { > if (x == 1) > return (sqrt(x)); > .... > > Do I get the job? Since you didn't declare "double sqrt (double)", and you are passing an int to a function expecting a double, and returning a double for a function that is supposed to return a float, this function will fail on any machine where sizeof(int) != sizeof(double) or sizeof(float) != sizeof(double). Since the specifications clearly called for "a thousand lines of DEBUGGED C a week", you obviously do NOT get the job. Sorry. I hear McDonalds is hiring. Tim_CDC_Roberts@cup.portal.com | Control Data... ...!sun!portal!cup.portal.com!tim_cdc_roberts | ...or it will control you.