What does it mean to numerically sort alpha characters in opposite of lexicographic, like in K&R 5-14 with option -n
What does it mean to numerically sort alpha characters in opposite of lexicographic, like
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the second edition of K&R, section 5.11, the comparison function
is used for numeric sorting (as opposed to using
strcmpfor lexicographic sorting).numcmpcalls the functionwhich converts a string to its double-precision floating-point equivalent.
In the example, sorting with the
-ncommand line argument is done by thedoublevalues returned by theatoffunction.