C Program to Sort Names in Alphabetical Order (Bubble Sort)

Sorting names alphabetically in C means sorting an array of strings — and that’s what makes this program a classic: you can’t compare strings with > or swap them with =. You need strcmp() to compare and strcpy() to swap, and that pair of ideas is exactly what this exercise teaches. This version reads N …