In a C program, a temp variable is used to temporarily swap two integers or to assign any value. In computer programming, a temporary variable is a variable with a short lifetime that is typically used to retain data that will be deleted quickly or before it can be placed in a more permanent memory location. Because it has a short lifetime, it is commonly referred to as a local variable, which is a variable with a limited scope.

Quicksort chooses a pivot from the collection, which is a somewhat arbitrary element. After that, the pivot point is used to partition (or divide) the larger unsorted collection into two smaller lists.

The name “Quick Sort” comes from the fact that it can sort a list of data elements significantly faster (twice or three times faster) than any other sorting algorithm. As a result, quick sort is also known as “Partition Exchange” sort. Pivot element is used to execute the c program to implement quick sort using recursion.

```
//c program to implement quick sort using recursion
#include<stdio.h>
void sort(int number[25],int first,int last)
{
int i, j, pivot, temp;
if(first<last){
pivot=first;
i=first;
j=last;
while(i<j)
{
while(number[i]<=number[pivot]&&i<last)
i++;
while(number[j]>number[pivot])
j--;
if(i<j)
{
temp=number[i];
number[i]=number[j];
number[j]=temp;
}
}
temp=number[pivot];
number[pivot]=number[j];
number[j]=temp;
sort(number,first,j-1);
sort(number,j+1,last);
}
}
int main()
{
int i, count, number[25];
printf("How Many Elements Do You Want");
scanf("%d",&count);
printf("Enter %d Elements", count);
for(i=0;i<count;i++)
scanf("%d",&number[i]);
sort(number,0,count-1);
printf("After Sorting");
for(i=0;i<count;i++)
printf(" %d",number[i]);
return 0;
}
```

Output:

How Many Elements Do You Want3

Enter 3 Elements45

23

45

After Sorting 23 45 45

Quick Sort in C Program With Explanation

Quick Sort Program in C Using Recursion

Bubble Sort in Python Using Function

Bubble Sort in Python Using While Loop

Bubble Sort Program in Python Using List

Python Program to Print Inverted Pyramid Pattern

Python Program to Display Alphabet Pattern

Inverted Alphabet Triangle Pattern Program in Python

Quadratic Probing Program in Python