1000 lines of C a week?

Tim_CDC_Roberts at cup.portal.com Tim_CDC_Roberts at cup.portal.com
Wed Jun 14 02:15:33 AEST 1989


In <18783 at vax5.CIT.CORNELL.EDU>, sc2y at 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 at cup.portal.com                | Control Data...
...!sun!portal!cup.portal.com!tim_cdc_roberts |   ...or it will control you.

 



More information about the Comp.lang.c mailing list