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. Drawback of indirect addressing? • Drawback of this scheme is that it needs two memory references to fetch actual operand. First memory reference is to fetch the actual addr
If the input to T-flipflop is 100 Hz signal, the final output of the three T-flipflops in cascade is ? Ans. The final output of the three T-flip-flops in cascade is 12
types of internal conditioning with explanations and examples
Q. How are comparisons done in 8086 assembly language? There is a compare instruction CMP. Though this instruction just sets the flags on comparing two operands (both 16 bits
Dynamic partitioning: To rise above from difficulties with fixed partitioning, partitioning can be done dynamically, which called dynamic partitioning. Having it, the primary
What are the steps in executing the program? 1.Fetch 2.Decode 3.Execute 4.Store
how to more effective our project to css effect???
Q. What is Mini computer? The term minicomputer introduced in 1960's when it was realized that numerous computing tasks don't need an expensive modern mainframe computers howev
Q. Illustrate working of Pocket and PC-Card Modems? Pocket Modems: Small external Modems used with notebook PCs. PC-Card Modems: PC and Modems are read with PCMCIA slots w
Question: (a) Explain the three categories of design patterns. Give two examples from each category. (b) When describing a pattern what is the purpose of "The Intent", an
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd