void main()
{
char c[20],t;
int i,l,j;
clrscr();
printf("\n enter the string\t");
scanf("%s",c);
for(i=0;c[i] != '\0';i++);
l=i;
printf(" \t%d is the size.\n",l);
for(i=0;i<l;i++)
for(j=0;j<i;j++)
if(c[j]>c[i])
{
t=c[i];
c[i]=c[j];
c[j]=t;
}
printf("sorted string is \t %s\n",c);
getch();
}