About 3,410,000 results
Open links in new tab
  1. 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: …

  2. 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 …

  3. Sorting using pointers in C program - Stack Overflow

    Jun 18, 2014 · Looks more like a selection sort. Two things. 1) For ascending order, change the if statement to. 2) You don't need to check the entire array every time. You can start from the …

  4. 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 …

  5. 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 …

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

    Learn how to sort an array using pointers in C with this comprehensive guide. Discover step-by-step instructions, example code, and detailed explanations to efficiently sort arrays and …

  7. How to sort an array using pointers in C - Programming …

    To sort an array using pointers in C, you can follow these steps: Declare a pointer variable to store the address of the array. Use a sorting algorithm (such as bubble sort, selection sort, …

  8. Implementing generic sorting using function pointers in C

    Dec 2, 2024 · Let’s learn function pointers in C by implementing a generic sorting function. Let’s start with a non-generic sorting program. Our program sorts an array of integers. arr[i] = arr[j];...

  9. Using Pointers Sort Array - EasyCodeBook.com

    Dec 9, 2022 · Using Pointers Sort Array - Write a program in C Programming Language To input array of N numbers and Sort it in Ascending Order.

  10. c - Sorting with pointers instead of indexes - Stack Overflow

    Oct 22, 2012 · You can replace your indexes by using pointers: void sort(int *pointer, int size){ int *i, *j, temp; for(i = pointer; i < pointer + size; i++){ for(j = i + 1; j < pointer + size; j++){ if(*j < *i){ …

Refresh