Re: K&R Exercise 6-2



mdh wrote:
On Aug 29, 5:11 am, Eric Sosman <esos...@xxxxxxxxxxxxxxxxxxxx> wrote:
mdh wrote:
In most of the exercises that K&R write, there seems to be a
relationship to some library function .......
Exercise 6-2

The exercise seems designed to point out the difference
between strcmp() and strncmp(), in the context of a comparison
function for qsort(). So there's certainly a library tie-in,
if that's what you felt was missing.



Thank you Eric.


However, the definition of "alphabetical order" according to strcmp,
isn't exactly the same on different character sets.

In ASCII, a variable name like "A6A", comes before "ABA".
In EBCDIC, a variable name like "A6A", comes after "ABA".

Also uppercase letters come before lower case in ASCII,
but not in EBCDIC.

--
pete
.



Relevant Pages

  • Re: Help on functions of noncommuting operators
    ... develop in series of powers of x the function ... Read the appropriate chapter to find out the context. ... Richmond, VA- Nascondi testo citato ... I believe this is supposed to be a simple exercise without ...
    (sci.physics)
  • Re: Set Theory Exercise
    ... I was hoping to avoid controversy... ... post your replying to, it's not clear to whom you are replying or what you ... Please don't remove context, it leads to gibberish. ... > I think that the authors think the exercise isn't a mistake, ...
    (sci.logic)
  • Re: A Manual of Practical Reason
    ... > of an excerpted phrase in an obvious exercise in short-copy ... > designed to cause readers to inference in context. ...
    (sci.logic)
  • Re: First round of descriptive/external exercises
    ... > With purpose and emphasis presumably determined by the larger context? ... There is no larger context. ... It's an *exercise*, like scales ...
    (rec.arts.sf.composition)
  • Re: How do you "Create a Title Page" in word for Office 2007?
    ... I think it's a matter of poor writing on the part of the exercise author. ... the context, the request is probably to create a style, ... it the required formatting characteristics. ...
    (microsoft.public.word.newusers)