Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9122727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:10:15+00:00 2026-06-17T06:10:15+00:00

I am studying C from Stephen Prata’s C Primer Plus . Here is one

  • 0

I am studying C from Stephen Prata’s C Primer Plus. Here is one question from chapter 11.

Write a program that reads in up to 10 strings or to EOF, whichever comes
first. Have it offer the user a menu with five choices: print the original
list of strings, print the strings in ASCII collating sequence,
print the strings in order
of increasing length, print the strings in order of the length of the first word
in the string, and quit. Have the menu recycle until the user enters the quit
request. The program, of course, should actually perform the promised tasks

I understand the problem except for the bit where it asks “print the strings in ASCII collating sequence”. What does it mean? Does it mean that I have to change the
order of characters as in ASCII collating sequence?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:10:16+00:00Added an answer on June 17, 2026 at 6:10 am

    Collation means the “logical” ordering of strings. For the “C” locale, this is indeed equivalent to sorting by ASCII codes (using strcmp()).

    However, collation is locale-dependent.

    For example, in ISO 8859-1 encoding and DE locale, the letter “ü” (0xfc) shouldn’t end up after “z” (0x7a) / at the end of the list, as it would with a strcmp() sorting, but be sorted equivalent to “ue” (0x75 0x65)…

    And because you can’t probably know all facts about all existing locales, the standard library provides strcoll(), strxfrm(), wcscoll(), wcsxfrm() and the LC_COLLATE option to setlocale(), which do the locale-specific stuff for you.

    Welcome to the world of internationalization. 😉 Lucky the question explicitly asks for “ASCII collating”, which means you get away with strcmp()…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Probably another dumb question that results from my studying in bad C++ book (I
While studying for a Functional Programming exam, I came across the following question from
The following code was taken from the book I'm studying and they say that
Hi I am studying some codes from the web that I need for a
I am studying .net Remoting I've read from MSDN, but in one step I
There is a section of code from a learning resource that I am studying.
Hi I'm studying IOS programing through example code from the web. I found that
I'm studying Getting Started with ASP.NET MVC3 chapter from asp.net . I've just created
I am studying from the Stanford CS193P from Paul Hegarty. Then I see something
I'm a first time programmer, first time StackOverflow user, studying from Allen Downey's free

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.