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!
C Program for SORTING OF NUMBERS
main()
{
int a[20],i,j,temp,n;
clrscr();
printf("ENTER THE MAXIMUM LIMIT: ");
scanf("%d",&n);
for(i=1;i<=n;i++)
printf("ENTER %d ELEMENT: ",i);
scanf("%d",&a[i]);
}
for(i=1;i<=n-1;i++)
for(j=i+1;j<=n;j++)
if(a[i]>a[j])
temp=a[i];
a[i]=a[j];
a[j]=temp;
printf("\nTHE SORTED ELEMENTS ARE. \n");
for(j=1;j<=n;j++)
printf(" %d",a[j]);
getch();
OUTPUT :
ENTER THE MAX. LIMIT: 5
ENTER 1 NO: 5
ENTER 2 NO: 8
ENTER 3 NO: 10
ENTER 4 NO: 1
ENTER 5 NO: 2
THE SORTED ELEMENTS ARE:
1 2 5 8 10
This problem familiarizes you with using random numbers in C++. The program is to compute a good approximation of π using a simulation method called "Monte Carlo". The following fi
Program is to append the contents of one file to another: void main() { clrscr(); fstream file1,file2; char st1[13],st2[13];/* 13 because a filename canno
Make the following 3 functions work by filling in appropriate C code. This file 1. // Write a function to count the number of particular characters in a string. // Do not use a
Incomplete types refer to pointers in which there is no availability of the execution of the referenced location or it points to some location whose value is not available for modi
How does free know the size of memory to be deleted.? int *i = (int *)malloc(12); followed by free(i); how did free function call know how much of memory to delete? A: It bas
Stage One Define the specification of the program Add two nxm size matrices Stage Two Divide the program up into separate modules Input Matrix Ad
Write a sequence of instructions that transfers data from memory to an external I/O device by using channel 3 of the 8237 DMA controller. Transfer from 20000H-20FFFH.
Overall Program Objective: You will design and simulate a basic RISC processor. You will create and encode an instruction set. Your final task will be to "compile" a program
At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes
C Program to check FACTORIAL main() { int i,j,m,fact,sum=0; clrscr(); printf("ENTER THE NO.: "); scanf("%d",&m);
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