Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Shell sort - C Program:
Write a program to define shell sort.
void main()
{ //program for sorting by select sort
int a[20],i,k,j,n;
clrscr();
printf("How many nos are to be sorted\n");
scanf("%d",&n);
for (i=0;i<=n-1;i++)
{
printf("Enter the value of %d no\t",i+1);
scanf("%d",&a[i]);
}
printf("Make sure !Are your values read correctly?\n");
printf("%d \n",a[i]);
for (i=0;i<=n-1;i++) //In select sort we consider the 1 st element &
for (j=i+1;j<=n-1;j++) //compare it with the remaining in the 1st step
{ //&swaping is done next considering 2nd element etc.
if (a[i] >= a[j])
k=a[i];
a[i]=a[j];
a[j]=k;
printf("The sorted data is\n");
for (j=0;j<=n -1;j++)
printf("%d\n",a[j]);
getch();
FUNCTIONS It refers to a subprogram that is meant to do a certain task. It is basically used to execute a set of operations and return information to the main or calling functio
The heart of the modern electronic system is the microprocessor e.g. the video, sound, game consoles, portable phones and domestic appliances. Let us consider the heart of a home c
(c) A static member function can access static member data only, static member functions and functions and data outside the class. A static member function may be called, even whil
Friend Functions One of the major features of OOP is information hiding. A class encapsulates data and methods to operate on that data in a single unit. The data from the class
boardcoloring with minimum color of 4
Write a program to calculate the timetable for numbers 1 -> 10 and display them as follows. Your solution should use for do loops #include stdio.h void main() { char p
What is algorithm
1. Dene a function chomp :: String -> String that selects a run of repeated characters from the start of a string with the run being as long as possible. For example ch
Why PHP is sometimes called as embedded scripting language? PHP is a high level language that is used to allow users to write and understand it in human readable form and also
How does free know the size of memory to be deleted.? int *i = (int *)malloc(12); followed by free(i); how did free function call know how much of memory to delete? A: It bas
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd