English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

4 answers

here is a C Program

#include
#include
main()
{
struct w
{
char words[100];
}a[100];

int n;
int i,j;
char t[100];
printf("\nEnter the number of words");
scanf("%d",&n); //Total no. of words
printf("Enter the words");
for(i=0;i scanf("%s",a[i].words); //Enter the words to be sorted

for(i=0;i {
for(j=i;j {
if(strcmp(a[i].words,
a[j].words)>0)
{
strcpy(t,a[j].words);
strcpy(a[j].words,a[i].words);
strcpy(a[i].words,t);
}
}
}

printf("\n\nAlphabetical Order\n");
for(i=0;i printf("\n%s",a[i].words); //This will print alphabetically

getch();
}

2006-07-07 19:45:11 · answer #1 · answered by R.Nagarajan 2 · 0 0

You can download and install OpenOffice from http://www.openoffice.org , open a spreadsheet (OpenOffice.org Calc), type in the words (or import them), one word in each "cell" which then you can sort them as you like. I use it for karaoke lists.

2006-07-08 01:58:06 · answer #2 · answered by bogus_dude 6 · 0 0

see this
http://analysingc.50webs.com/c/string_sort.html

this is my own website ........

2006-07-09 07:45:10 · answer #3 · answered by Anonymous · 0 0

sort

2006-07-08 01:56:52 · answer #4 · answered by Dave R 6 · 0 0

fedest.com, questions and answers