PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs223] Strtol
Date: Tuesday, 31 Mar 2020, 16:06:26


    > Message Posted By: Unknown
    >
    > When using Strtol are we allowed to create a new string for the key to use
    > for sorting when we are given pos len parameters?

No, you may not use malloc() to create keys.
=====

    > Also when we are fputting to standard out are we outputting the line and
    > pos,len parameters or just the line? ...

Qsort prints the line with the newline restored, not
just the key.
=====

    >                                 ...  If this is the case, for the first
    > example in the spec how would you be able to tell if you sorted correctly
    > since all the lines outputted would be the same?

This is another reason why the entire line is printed.

--Stan-
PREV INDEX NEXT