C Program to Sort an Array in Descending Order Using Bubble Sort



/*
www.troubleshootyourself.com
C program to sort an Array in Descending order using Bubble Sort
*/
 
#include 
 
#define MAX 100
 
int main()
{
    int arr[MAX], maxLimit;
    int i,j,temp;
     
    printf("Enter total number of elements to sort: ");
    scanf("%d",&maxLimit);
     
    /* Read elements to sort */
    printf("Enter array elements: \n");
    for(i=0; i

Check and run the program here:

You can run the above program on codeboard editor and see the results. You are allowed to modify code and run. In the editor there is a menu at the top-right corner. Here you can see two buttons such as ‘Compile’ and ‘Run’.

Share this:
We will be happy to hear your thoughts

      Leave a reply

      www.troubleshootyourself.com
      Logo