Re: K&R Exercise 6-2
- From: pete <pfiland@xxxxxxxxxxxxxx>
- Date: Fri, 29 Aug 2008 09:11:56 -0400
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 aThe exercise seems designed to point out the difference
relationship to some library function .......
Exercise 6-2
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
.
- Follow-Ups:
- Re: K&R Exercise 6-2
- From: Doug Miller
- Re: K&R Exercise 6-2
- References:
- K&R Exercise 6-2
- From: mdh
- Re: K&R Exercise 6-2
- From: Eric Sosman
- K&R Exercise 6-2
- Prev by Date: Re: Pointer dereference rather than sizeof?
- Next by Date: Re: K&R Exercise 6-2
- Previous by thread: Re: K&R Exercise 6-2
- Next by thread: Re: K&R Exercise 6-2
- Index(es):
Relevant Pages
|