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();
What is assembly language? Assembly language : It is a family of low-level language for microprocessors, programming computers, microcontrollers etc. All are implement a symbo
One cannot use SELECT statements in a report program linked to a Logical Database False. You can use th SELECT statements.
Q. What is Building and Running MPI Programs? MPI parallel programs are written using conventional languages such as FORTRAN and C. One or more header files like 'mpi.h' may be
a. Explain about exception? When do they occur? Show using an example how to give your own exception handler. b. Can you restrict the types of exception that a function can thro
Discuss the advantages of automatic switching systems over manual switching system. Automatic switching systems have some advantages over the manual exchanges: 1. In a manua
Q. Illustrate Memory Read operation? Memory unit receives the address from a register known as the memory address register designated by MAR. Data is transferred to another re
Real-Time Software Programs that monitor/analyze/ control real world events as they take place are known as real-time software. Elements of real-time software involve a data
Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b
Q. Characteristics of Magnetic disk? Tracks and Sectors: Disk is divided in concentric rings known as tracks. Thus a track is one complete rotation of disk underneath read/wr
Example Calculation: If we see an example we are working with a set of examples like S = {s 1 ,s 2 ,s 3 ,s 4 } categorised with a binary categorisation of positives and negati
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