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();
Problem 1. Discuss polymorphism in c++. Explaining Polymorphism 2. Write a program in c++ to read a 3X2 matrix and find smallest number in that matrix. Writin
derivations 1. Regardless of the type of derivation, private members are inherited by the derived class, but cannot be accessed by the new member function of the derived class,
How must runtime errors be handled in C++ - Runtime errors in C++ can be handled using exceptions. - This exception handling mechanism in C++ is developed to handle errors i
Are comments included during compilation stage and placed in EXE file as well? - No, comments encountered by compiler are disregarded. - Their only purpose is ease and guida
A: Use std::ios::binary. Some operating systems differentiate among text and binary modes. In text mode, end-of-line sequences and perhaps other things are translated; in binary
A: Use operator overloading to present a friend right-shift operator, operator>>. It is similar to the output operator, except the parameter doesn't contain a const: "Fred&" instea
A: In C++ a struct is alike to a class except for the default access specifier( refer to other question in the document). In C we ought to include the struct keyword while declarin
A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci
A palindrome is a string that reads the same from the both the ends. Given a string S convert it to a palindrome by doing character replacement. Your takes is to convert S to palin
Need help in network programming in C++ project. How much you charge?
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