in Education by
Process of placing elements from a collection in some kind of order Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Process of placing elements from a collection in some kind of order is called as “Sorting“. Sample Program to sort elements in Ascending order: #include void main() { int c,d,e[50]; printf(“Enter the value of n: “); scanf(“%d”, &d); printf(“Enter numbers: “); for(int i = 0; i < d; i++) { scanf(“%d”, &e[i]); } for(int i = 0; i < d; i++) { for(int j = i + 1; j < d; j++) { if(e[i] > e[j]) { c = e[i]; e[i] = e[j]; e[j] = c; } } } printf(“After sorting in ascending order: “); for(int i = 0; i < d; i++) printf(“%d\n”, e[i]); } Output: Enter the value of n: 5 Enter numbers : 20 10 30 5 4 After sorting in ascending order: 4 5 10 20 30 Hope it helps!

Related questions

0 votes
    B. State True or False: 1 Copying refers to placing data from one place to another. 2. Ctrl + Akey ... column the existing settings. Select the correct answer from above options...
asked Dec 2, 2021 in Education by JackTerrance
0 votes
    What are the two ways to iterate the elements of a collection? Select the correct answer from above options...
asked Dec 30, 2021 in Education by JackTerrance
0 votes
    A ________ is a computer to which a user doesn't have physical access , which she can access or manipulate ... of computer network. Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    The elements A, B, C and D have atomic numbers 9, 10, 11 and 12 respectively. The correct order of ionization energy is ... > A > D > C Select the correct answer from above options...
asked Aug 3, 2022 in Education by JackTerrance
0 votes
    Slide Rule allowed the operator to multiply, divide and calculate square and cube roots by moving the rods ... constructed boards. Select the correct answer from above options...
asked Dec 10, 2021 in Education by JackTerrance
0 votes
    a collection of information pertaining to some type of entity is called Select the correct answer from above options...
asked Nov 27, 2021 in Education by JackTerrance
0 votes
    The optical computers are increasingly accessing our real-world data to build products that show commercial value ... 50% Select the correct answer from above options...
asked Dec 5, 2021 in Education by JackTerrance
0 votes
    Q3: Write a program to subtract a matrix from another both have order 3*3. Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    While doing online payments, what kind of websites should be trusted? Select the correct answer from above options...
asked Dec 20, 2021 in Education by JackTerrance
0 votes
    7. SUPPOSE YOU ARE TRYING TO READ A BOOK IN A ROOM FILLED WITH LOUD NOISE, WHAT KIND OF COMMUNICATION BARRIER TO ... ARE YOU FACING?* Select the correct answer from above options...
asked Dec 13, 2021 in Education by JackTerrance
...