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!
Write a C program to sort in ascending order of n numbers.
# include
void main()
{
int a[25],no,i,j,m,t;
clrscr();
printf("\nEnter Total number of inputs : ");
scanf("%d",&no);
printf("\nEnter %d number : ",no);
no--;
for(i=0;i<=no;i++)
scanf("%d",&a[i]); /* Enter array elements */
for(i=0;i<=no;i++) /* Number of Passes */
for(j=0;j /*Compare an element with the next element one by one*/ { if(a[j] { t=a[j]; /* Interchange the two if first is smaller */ a[j]=a[j+1]; a[j+1]=t; } } } printf("\n Sorted numbers are :\n"); for(i=0;i<=no;i++) printf("%d",a[i]); getch(); }
/*Compare an element with the next element one by one*/
if(a[j] { t=a[j]; /* Interchange the two if first is smaller */ a[j]=a[j+1]; a[j+1]=t; } } } printf("\n Sorted numbers are :\n"); for(i=0;i<=no;i++) printf("%d",a[i]); getch(); }
t=a[j]; /* Interchange the two if first is smaller */
a[j]=a[j+1];
a[j+1]=t;
}
printf("\n Sorted numbers are :\n");
printf("%d",a[i]);
getch();
Data Stream and Instruction Stream The term 'stream' refers to an order or flow of either data operated or instructions on by the computer. In the complete chain of instructi
Convenience of Environments -artificial intelligence: In some cases, some aspects of an environment which should be taken into account in decisions about actions may be unavai
Explain various classes of datatypes of C Following are the main classes of data types in C language: 1. Primary data types: Also called as fundamental/basic data types
Software engineering is:- The application of a disciplined engineering move towards to the development of software systems. A body of information and knowledge in software d
Question 1: Using appropriate diagrams, describe the optimal provision of a private good and a public good. Question 2: Using appropriate diagram, show how there is an
What are the different between Public Key Encryption and Secret Key Encryption? Differentiate between Public Key Encryption and Secret Key Encryption: A cryptographic sys
Question: (a) Identify the four main enhancements brought along by TKIP on WPA to solve the problems in WEP. (b) The term WarDriving has been frequently used while talking
What is insertion sort? Insertion Sort : One of the easiest sorting algorithms is the insertion sort. Insertion sort having of n - 1 passes. For pass p = 2 by n, insertion so
What is Redundant Array of Independent Disks? Researchers are constantly trying to improve secondary storage media by raising their, performance, capacity as well as reliabilit
What are the steps to design algorithm? Formulate algorithm for each operation. Analysis specification tells what the operation does. The algorithm shows how it is done. The st
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd