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();
Tell me which queue having present queue depth should be greater than zero? Ans) Event queues Open MQ Explorer by selecting Start > Programs > IBM WebSphere MQ > WebSphere
How sensors uses in real time process control Sensors send data (through an analogue to digital converter - ADC) to a microprocessor or computer that decides whether or not to
What is polling? Polling is a scheme or an algorithm to recognize the devices interrupting the processor. Polling is employed when multiple devices interrupt the processor by o
Is it possible to extract data from tables without using the event 'GET' in the report with an appropriate LDB. False. You can extract data from tables using Select stateme
Define Apple MobileMe Calendar The MobileMe Calendar is a web-based calendar that can be accessed from any computer linked to the Internet, Mac or Windows. What makes it more u
Q. Explain Indirect Cycle in control unit? Once an instruction is fetched the subsequent step is to fetch the operands. The instruction may have indirect and direct addressing
Parallelism Conditions As discussed earlier, parallel computing needs the segments to be executed in parallel should be independent of each other. So before executing paralleli
How object oriented development is dissimilar from structured development object oriented development is dissimilar from structured development of the system. In the structure
(a) Explain in a few sentences the difference between a natural frequency and a resonant frequency. Also clarify why for a specific system or component these frequencies may diff
a. Explain the hardware mechanism for handling multiple interrupt requests. b. What are handshaking signals? Describe the handshake control of data transfer during input and out
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