473,320 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Sorting names in ascending order ?.

2 2Bits
Hello,

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


thanks
jackyjoy
Jan 3 '21 #1
4 2901
dev7060
626 Expert 512MB
I was wondering if the bubble sort could work with character strings, to sort names in C?
I believe so.   ⠀⠀⠀⠀           
Jan 4 '21 #2
Naheedmir
62 32bit
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
Jan 13 '21 #4
Banfa
9,065 Expert Mod 8TB
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.
Jan 13 '21 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: news.hku.hk | last post by:
i have a array of objects from the class job, i.e. job teacher job teacher job teacher .............until job teacher these objects contain the string name of the teachers and ...
6
by: sriram | last post by:
Hi, I have been seing a weird problem with db2look tool in db2 8.2 on Windows 2000 platform. When i spool the DDL using db2look, it spools the DDL in the ascending order of database objects...
2
by: fred_stevens | last post by:
Hi all you C boffins: I need to sort a vector of doubles is ascending order. Qsort will return the sorted vector, but I need a vector of the indices of the sorted vector, not the actual sorted...
2
by: PRadyut | last post by:
In this code i tried to add the elements in ascending order but the output is only 0 1 2 the rest of the elements are not shown. the code...
2
by: Joe | last post by:
Hi, I have an asp.net script that connects to MS Access database and displays data in a table. For some reason I am do not know how to display data say in ascending order of column1. I have...
5
by: Nick Weisser | last post by:
Hi there, I'm not sure how to select the last 3 items in ascending order. This does the trick in descending order: select * from user_menu_main where deleted = 0 and hidden = 0 order by...
3
by: Eric Lilja | last post by:
Hello, consider the following assignment and my code for it: /* Write a program that does the following: * Integer numbers shall be read from a textfile and stored in a std::vector. The name...
4
by: neelesh kumar | last post by:
sir, i have a table named tblexam. i want to sort the whole table records according to the field subcode in ascending order. docmd.runsql "update tblexam order by subcode asc" But it is...
6
by: flyaway888 | last post by:
Hey, I have a function that compares 2 arrays with 6 numbers in each and outputs the matching numbers. I have written a function that does this but I need to output the numbers in ascending order...
13
by: neelsfer | last post by:
I have this cycling timing program. I get the correct data from my start and finish calculations, but is struggling to sort the total time in a report. It works like this. - A cyclist do laps...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.