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 do you mean by system calls? System calls give the interface among a process and the operating system. When a system call is executed, it is treated as by the hardware as
Q. Explain about Magnetic Disk? A disk is circular platter constructed of nonmagnetic material known as substrate, coated with a magnetisable material. This is used for storing
Using Information in Information System Information Systems can be thought of as being useful at three levels: The detail level where information is used to carry out disc
Give difference between assembler and interpreter. Assembler: It is the translator for an assembly language of computer. An assembly language is a low-level programming langu
What are the steps in a BDC session? The first step in a BDC session is to recognize the screens of the transaction that the program will process. Next step is to write a pro
What is the significance of Technical settings (specified while creating a table in the data dictionary)? By specifying technical settings we can handle how database tables ar
DEFINE FILE ORGANISATION
How can I increase the number of rows or columns in a worksheet? Ans) In Excel, each workbook has 255 columns and 65,526 rows. These values are fixed and cannot be changed. If
Q. Define syntax of barrier directive? Barrier Directive The syntax of barrier directive is #pragma omp barrier When a thread attains barrier it waits till all threa
Programmable read only memory (PROM) A PROM is a memory chip on which data can be written only one time. Once a program has been written onto a PROM, it's permanent. Unlike RAM
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