Sorting names in ascending order ?.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jackyjoy123
    Banned
    New Member
    • Nov 2020
    • 2

    Sorting names in ascending order ?.

    Hello,

    I was wondering if the bubble sort could work with character strings, to sort names in C?


    thanks
    jackyjoy
  • dev7060
    Recognized Expert Contributor
    • Mar 2017
    • 656

    #2
    I was wondering if the bubble sort could work with character strings, to sort names in C?
    I believe so.   ⠀⠀⠀⠀            

    Comment

    • AjayGohil
      New Member
      • Apr 2019
      • 83

      #3
      Hello,

      May this helps you:
      Your All-in-One Learning Portal: GeeksforGeeks is a comprehensive educational platform that empowers learners across domains-spanning computer science and programming, school education, upskilling, commerce, software tools, competitive exams, and more.

      C programming, exercises, solution: Write a program in C to read a string from the keyboard and sort it using bubble sort.

      Comment

      • Naheedmir
        New Member
        • Jul 2020
        • 62

        #4
        Yes, the bubble sort could work with character strings, to sort names in C.
        I will suggest you to go through the below link in stackoverflow. I hope
        it will help you out

        /questions/61450131/bubble-sorting-an-array-of-strings-in-c

        Comment

        • Banfa
          Recognized Expert Expert
          • Feb 2006
          • 9067

          #5
          Any sorting algorithm can work with anything that can be compared so bubble sort can be used to sort numbers or strings or just blocks of 5 bytes of memory.

          Comment

          Working...