C Program For QUICK Sort In Ascending Order


void quicksort(int [10],int,int);

int main()
//Ghanendra Yadav
  int x[20],size,i;

  printf("Enter size of the array: ");

  printf("Enter %d elements: ",size);
  for(i=0;i    scanf("%d",&x[i]);


  printf("Sorted elements: ");
  for(i=0;i    printf(" %d",x[i]);

  return 0;

void quicksort(int x[10],int first,int last)
    int pivot,j,temp,i;

     if(first         pivot=first;

         while(i             while(x[i]<=x[pivot]&&i                 i++;
             if(i                 temp=x[i];




Ghanendra Yadav

Ghanendra Yadav

Hello, I Am Ghanendra Yadav Owner of This Blog, I am professional Blogger and Programmer. I Love Programming, Logo Making, And Banner Designing. My Highest Qualification is MCA From NIT Warangal. You Can Find Me On Social Media Through Below Link And If You Have Any Query Related To Programming And Other Subject Comment Below or You Can Mail Me I Will Try To Answer Within 24 Hours Email:- yghanendra@student.nitw.ac.in

Find me on Social Media

Facebook | Twitter | Google+ | RSS Feed

1 comment: