#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include<conio.h>
void insert(char *items, int count);
int main(void)
{
char s[255];
printf("Enter a string:");
gets(s);
insert(s, strlen(s));
printf("The sorted string is: %s.\n", s);
getch();
return 0;
}
void insert(char *items, int count)
{
register int a, b;
char t;
for(a=1; a < count; ++a)
{
t = items[a];
for(b=a-1; (b >= 0) && (t < items[b]); b--)
items[b+1] = items[b];
items[b+1] = t;
}
}
design an algorithm for Insertion Sort
No Answer is Posted For this Question
Be the First to Post Answer
Difference between new operator and operator new
what is object oriented programming and procedure oriented programming?
I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...
what is the new version of oops
Give two or more real cenario of virtual function and vertual object
what uses of c++ language?
Can bst contain duplicates?
What is meant by oops concept?
Explain the concepts involved in Object Oriented programming.
OOP'S advantages of inheritance include:
What is oops with example?
How many human genes are polymorphic?