Create a C program that would accept 10 strings from the user (each string has a maximum of 10 characters, letters only, no spaces). Your goal now is to sort them in lexicographical order (dictionary order) regardless of the case. You need to implement the functions toLowerCase and toUpperCase. You are free to use any sorting algorithm discussed. Example: Give me word number 1: banana Give me word number 2: apple Give me word number 3: asdfer Give me word number 4: zerosx Give me word number 5: banerZ Give me word number 6: ApPle Give me word number 7: ChoP Give me word number 8: chop Give me word number 9: ZerosX Give me word number 10: zErosx Give me word number 10: zErosx Sorted: ApPle (note that 1 and 2 can be interchanged) apple asdfer banana banerZ ChoP (note that 6 and 7 can be interchanged) chop ZerosX (last 3 can be interchanged) zErosx zerosx
Create a C program that would accept 10 strings from the user (each string has a maximum of 10 characters, letters only, no spaces). Your goal now is to sort them in lexicographical order (dictionary order) regardless of the case. You need to implement the functions toLowerCase and toUpperCase. You are free to use any sorting
Example:
Give me word number 1: banana
Give me word number 2: apple
Give me word number 3: asdfer
Give me word number 4: zerosx
Give me word number 5: banerZ
Give me word number 6: ApPle
Give me word number 7: ChoP
Give me word number 8: chop
Give me word number 9: ZerosX
Give me word number 10: zErosx
Give me word number 10: zErosx
Sorted:
ApPle (note that 1 and 2 can be interchanged)
apple
asdfer
banana
banerZ
ChoP (note that 6 and 7 can be interchanged)
chop
ZerosX (last 3 can be interchanged)
zErosx
zerosx
Step by step
Solved in 4 steps with 2 images