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