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();
Q. Displaying the List of Files with DIR? You can display the list of files kept in a diskette or hard disk with the DIR commend. This Commends list files and sub directories i
What are the disadvantages of FCFS scheduling algorithm as compared to shortest job first (SJF) scheduling? Disadvantages: (i) Waiting time can be huge if short requests w
Q. QWERTY - Keyboard Layout ? A keyboard layout is arrangement of keys across the keyboard. There is one keyboard layout which anybody who has worked on a standard keyboard or
Q. Define about Anchor Tag? Anchor tag is used to create links between various objects such as HTML pages, web sites, files etc. It is introduced by characters and termi
Define buffering. A buffer is a memory area that keeps data while they are transferred among two devices or among a device and an application. Buffering is done for three reas
Q. Determine the statement for array? Determine the statement ALIGN A[i] WITH B[i] This statement aligns every A[i] with B[i] as displayed in Figure below. Figure
benefit of hardware protection
Consider the following set of jobs with their arrival times, execution time (in minutes), and deadlines. Job Ids Ar r ival Time E xecuti
The next major set of tasks to tackle are delete and update. Version control systems typically version updates to a ?le and only store the differences between the ?les. Two system
Define Input-Output Interface. I/O interface gives a method for transferring information among internal storage and external I/O devices
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