Question: The program needs to sort last names and first names in alphabetical order from a file PROGRAM DONE IN THE C LANGUAGE Sort full names

The program needs to sort last names and first names in alphabetical order from a file

PROGRAM DONE IN THE C LANGUAGE

Sort full names based on last name, then sort based on first name if the last names are identical

tip: use two arrays of pointers to strings(arrays of char), one for the first names and one for the last names

When sorting, you just need to perform the swap on both lists

Take a command line argument as a filename, and get the list of names from that file.

Take a second command line arument as a filename, and write the sorted list of name to a file of that name.

Make the sorting case-insensitive, by creating & using your own version of the library function strcmp

BUT... when printing the names, you should keep the original capitalization.

Function name: strcmp_ci (stands for "string compare, case insensitive")parameters and return value work just like strcmp, except must be case-insensitivetips :instead of comparing names directly, copy them to temporary char arrays

convert letters in the temporary array to either rall uppercase or all lowercase

compare the the temporary arrays to decide whether two words need to be swapped

The program needs to sort last names and first names in alphabetical

Program #1: GS . o Modify the sorting list of words example from class in the following ways " Instead of single words, read pairs of first/last name pairs Sort full names based on last name, then sort based on first name if the last names are identical tip use two arrays of pointers to strings(arrays of char) o one for the first names o one for the last names * when sorting, you just need to perform the swap on both lists " Take a command line argument as a filename, and get the list of names from that file " Take a second command line aumen as a filename, and write the sorted list of name to a file of that name " Make the sorting case-insensitive, by creating & using your own version of the library function strcmp o BUT... when printing the names, you should keep the original capitalization Function name: strcmp.ci (stands for "string compare, case insensitive") * parameters and return value work just like strcmp, except must be case-insensitive * tips O instead of comparing names directly, copy them to temporary char arrays convert letters in the temporary array to either call uppercase or all lowercase compare the the temporary arrays to decide whether two words need to be swapped Program #1: GS . o Modify the sorting list of words example from class in the following ways " Instead of single words, read pairs of first/last name pairs Sort full names based on last name, then sort based on first name if the last names are identical tip use two arrays of pointers to strings(arrays of char) o one for the first names o one for the last names * when sorting, you just need to perform the swap on both lists " Take a command line argument as a filename, and get the list of names from that file " Take a second command line aumen as a filename, and write the sorted list of name to a file of that name " Make the sorting case-insensitive, by creating & using your own version of the library function strcmp o BUT... when printing the names, you should keep the original capitalization Function name: strcmp.ci (stands for "string compare, case insensitive") * parameters and return value work just like strcmp, except must be case-insensitive * tips O instead of comparing names directly, copy them to temporary char arrays convert letters in the temporary array to either call uppercase or all lowercase compare the the temporary arrays to decide whether two words need to be swapped

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!