home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18301 < prev    next >
Encoding:
Text File  |  1992-12-13  |  1.4 KB  |  35 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!enterpoop.mit.edu!bloom-picayune.mit.edu!news
  3. From: scs@adam.mit.edu (Steve Summit)
  4. Subject: Re: Question to test general C knowledge
  5. Message-ID: <1992Dec14.043655.5230@athena.mit.edu>
  6. Sender: news@athena.mit.edu (News system)
  7. Nntp-Posting-Host: adam.mit.edu
  8. Organization: none, at the moment
  9. References: <1992Dec10.145330.11726@cimage.com>
  10. Date: Mon, 14 Dec 1992 04:36:55 GMT
  11. Lines: 22
  12.  
  13. There's probably a more appropriate place to discuss this, but
  14. what the heck.
  15.  
  16. > I had to do this for co-ops in my past.  What I did was ask them to 
  17. > [write] a small C function on paper.  
  18. > ...
  19. > 2.  Input is a pointer to an array of 10 integers.  Sort the array.
  20.  
  21. Sorting problems are certainly far and away the most common quick
  22. programmer assessment questions, and probably account for a
  23. significant fraction of the number of unnecessary (i.e. all of
  24. them) bubble sort implementations in the world today.  What I'd
  25. like to know is, would the people posing such questions grade me
  26. higher or lower for presenting an answer which relegated all work
  27. to qsort()?  (Chapter two of The Elements of Programming Style
  28. opens with a similar observation: "If our purpose is to teach how
  29. to compute the minimum, we write [code deleted] which is direct
  30. and to the point...  But if we are just trying to get the job
  31. done, we use the Fortran built-in function AMIN1[.])
  32.  
  33.                     Steve Summit
  34.                     scs@adam.mit.edu
  35.