#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
What is the difference between procedural programming and oops?
Write a program to get the binary tree.
Generally, in all C++ programs, texts are in white colour. Can we change the colour of the text(either input or output or both)? If so, help me out.
Program to open a file with First argument
What is the difference between pass by reference and pass by value?
explain dynamic binding by drowing
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.
What are the advantanges of modularity
What are the valid types of data that the main () can return in C/C++ language
Can an interface inherit a class?
What is coupling in oop?
What is R T T I ?