Write a C program that reads in a list of letters, sorts them alphabetically and
ID: 667927 • Letter: W
Question
Write a C program that reads in a list of letters, sorts them alphabetically and prints them to the screen. The program must adhere to the following specifications:
a) The program must ask the user how many letters can be expected.
b) The program then should ask the user for all the (capital or lower-case) letters and should make sure the letters entered are valid letters (and not symbols).
c) Capital letters should be sorted before lower-case letters.
d) Your program must use dynamic memory allocation for all arrays needed. In addition, pointers must be used for all operations that access the array(s). Thus, your program must not include any square brackets (‘[‘ or ‘]’) anywhere in the code.
e) Your program must consist of a main()function, a sort(char *a, int size) function, and a swap(char *x, char *y) function.