#include
#include
#include
#include
void select(char *items, int count);
int main(void)
{
char s[255];
printf("Enter a string:");
gets(s);
select(s, strlen(s));
printf("The sorted string is: %s.\n", s);
getch();
return 0;
}
void select(char *items, int count)
{
register int a, b, c;
int exchange;
char t;
for(a = 0; a < count-1; ++a)
{
exchange = 0;
c = a;
t = items[ a ];
for(b = a + 1; b < count; ++b)
{
if(items[ b ] < t)
{
c = b;
t = items[ b ];
exchange = 1;
}
}
if(exchange)
{
items[ c ] = items[ a ];
items[ a ] = t;
}
}
}
design an algorithm for Selection Sort
2554
Please send ford technologies placement paper 2 my mail id
2103
What is oops and its features?
1083
What is the difference between static polymorphism and dynamic polymorphism?
1090
What is the oops and benefits of oops programming?
976
is there any choice in opting subjects like 4 out of 7
2186
What are the 5 oop principles?
1127
What is a superclass in oop?
1175
Why do we need polymorphism in c#?
1170
What are the 3 pillars of oop?
1193
What is this pointer in oop?
1074
What is polymorphism explain?
1256
Is oop better than procedural?
1041
What are the 3 principles of oop?
1119
What is overriding vs overloading?
1061