i am making a program to take in integer 'n' then 'n' amount of strings, i then need to sort them by length of size then each string needs to be alphabetically sorted, i can sort the strings out by length but struggling to find a way to run through each character and put them in alphabetical order can anyone shine some light?
has to be done in heap memory so before all the sorting Ive had to allocate a default memory to each string then reallocate memory to the size of the string an so on, which seems to make the rest of the program tricky, took me while to get my head round it but now Ive hit a wall trying to sort out each alphabetically
If you are sorting each string in an array of strings, then you will need 3 loops (if you are using bubble sort). Create a bubble sort function that will sort a single string. Then loop through every string and call bubble sort.