answersLogoWhite

0

#include<stdio.h>

#include<conio.h>

#include<string.h>

void main()

{

int i,j,d;

char ch[20],temp;

clrscr();

printf("\nEnter the no.of string:");

scanf("%d",&d);

printf("\nEnter the strings:");

for(i=0;i<d;i++)

{

gets(ch[i])

}

printf("\nThe strings are:");

for(i=0;i<d;i++)

{

printf("\n%s",ch[i]);

}

for(i=0;i<d;i++)

{

for(j=i+1;j<d;j++)

if(ch[i]>ch[j])

{

temp=ch[i];

ch[i]=ch[j];

ch[i]=temp;

}

}

getch();

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is a VB script to sort a string in ascending order?

uitihyiuiphoiphuihyi


A C program using dynamic memory allocation to sort n names in ascending order?

Writing a C program that uses dynamic memory allocation to sort names in ascending order is a typical computer science assignment. To write this program, you must be in UNIX.


Which action do you perform on a data source to reorganize the order of the record for a merge?

You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.


What does it mean to sort a table in ascending order?

To sort from smallest to largest. Ascending means to go up.


What is it called when a feature sorts data into ascending alphabetical or numerical order?

ascending sort


What two ways can you sort information?

In ascending order and in descending order.


Write a program to sort elements of an array in ascending order?

import java.util.Arrays; public class arraysort { public static void main(String[] a) { int array[] = { 2, 5, -2, 6, -3 }; Arrays.sort(array); for (int i : array) { System.out.println(i); } } }


You can sort numeric fields in ascending order only?

No. They can be sorted either ways. Ascending or Descending.


How do you sort three nondescending numbers?

In ascending order, perhaps!


How do you sort dates in ascending order?

You can sort dates as you would sort regular data, highlight the range and click on sort and pick the order you want.


What does ascending sort order mean?

That they appear in alphabetical order... A, B, C. ... and so on.


What button do you use to put data in a specific order?

The sort buttons. You can use them to sort in ascending order or descending order. One has A above Z with a down arrow enabling you to sort in ascending order. The other has Z above A with a down arrow enabling you to sort in descending order. Once your data is selected, you can click the appropriate button to do the sort you want.