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 reification? It is the promotion of something that is not an object into an object. Helpful method for Meta applications. It shifts the level of abstraction. Promote
How will you fine-tune a class? It is useful to fine-tune classes before writing code in order to examine development or to improve performance. The purpose of execution is to
Q. Explain about working of Multiplexer? Multiplexer is one of the fundamental building units of a computer system that in principle permits sharing of a common line by more th
INSERT OPERATION The insert operation inserts a new value into a set of bits. This is done by first masking bits and then O ring them with required value. For illustration, sup
Determine about the Security Policy In the United States, the government has a separate organisation looking after the security measures and providing guidelines to all departm
Potential of Parallelism Problems in the actual world differ in respect of the amount of inherent parallelism intrinsic in respective problem domain. Some problems can be easil
definf memory operation
When is a memory unit called as RAM? A memory unit is called as RAM if any location can be accessed for a read or writes operation in some fixed quantity of time that is indepe
How do subroutines help in program writing? Some of the significant characteristics of Subroutine that help in program writing are: A subroutine is named, each have a
Task A task is logically discrete section of computational work. A task is normally a program or else set of instructions which are executed by a processor. Parallel
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