About 2,340,000 results
Open links in new tab
  1. C program to sort array in ascending or descending order using pointer ...

    Sep 2, 2021 · In this C programming tutorial, we will learn how to sort elements of an array in ascending or descending order using C pointer. The program will take the array inputs from …

  2. C program to sort an array using pointers - GeeksforGeeks

    Oct 26, 2022 · Given an array of size n, the task is to sort this array using pointers in C. Examples: Output: {0, 9, 12, 14, 23} Input: n = 3, arr[] = {7, 0, 2} Output: {0, 2, 7} Approach: …

  3. Sorting using pointers in C program - Stack Overflow

    Jun 18, 2014 · makes the arrangement in descending order, just make that line: if( *(ptr+i) < *(ptr+j)) and the output will be in ascending order.

  4. C Program: Sort an array using pointer - w3resource

    Mar 19, 2025 · Write a C program to sort an array in ascending order using pointer arithmetic and bubble sort. Write a C program to sort an array in descending order using pointer-based …

  5. C Program to Sort an Array in Descending Order - Sanfoundry

    Here is source code of the C program to sort the array in an descending order. The program is successfully compiled and tested using Turbo C compiler in windows environment. The …

  6. C program to sort an array using pointers - Codeforwin

    Dec 1, 2017 · Below is the step by step descriptive logic to sort an array using pointer. Input size and elements in array. Store them in some variable say size and arr. Declare two function with …

  7. C Program to Sort the Elements of an Array in Descending Order

    Nov 20, 2024 · In this article, we will learn different ways to sort an array in descending order in C. The simplest method to sort the array in descending order is by using the in-built library …

  8. C ArraySorting Ascending and Descending in C Language

    Program to Sorting Ascending and Descending in C Arrays. We will use the qsort() function with different compare functions to sort array

  9. C Program to Sort an Array using a Pointer - Tutorial Gateway

    Write a C program to sort an array using a pointer. This example passes the pointer to the SortArray function and uses the temp variable inside the for loop to sort the array in ascending …

  10. How can I sort arrays in a pointer array in a descending order using ...

    Apr 11, 2017 · I am working on a project that sorts arrays inside the pointer arrays in a few different ways, though I am stuck on one way of sorting. The arrays are built in a way that the …

  11. Some results have been removed