wtie a program which take as tring and arrange in alphabetic order
#include<stdio.h>
#include<conio.h>
#include<iostream.h>
void main (void)
{
clrscr();
char b[7]={98,120,97,113,122,121,101},temp=0;
while (!(b[0]<b[1]&&b[1]<b[2]&&b[2]<b[3]&&b[3]<b[4]&&b[4]<b[5]&&b[5]<b[6]&&b[6]<b[7]))
{
if (b[0]>b[1])
{
temp=b[0];
b[0]=b[1];
b[1]=temp;
}
if (b[1]>b[2])
{
temp=b[1];
b[1]=b[2];
b[2]=temp;
}
if (b[2]>b[3])
{
temp=b[2];
b[2]=b[3];
b[3]=temp;
}
if (b[3]>b[4])
{
temp=b[3];
b[3]=b[4];
b[4]=temp;
}
if (b[4]>b[5])
{
temp=b[4];
b[4]=b[5];
b[5]=temp;
}
if (b[5]>b[6])
{
temp=b[5];
b[5]=b[6];
b[6]=temp;
}
if (b[6]>b[7])
{
temp=b[6];
b[6]=b[7];
b[7]=temp;
}
}
for (int c=0;c<=0;c++)
{
cout<<b;
}
getch();
}