online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
//Quick Sort #include <stdio.h> void quicksort(int a[20], int low, int high); int partition(int a[], int low, int high); void main() { int a[20],n,i; printf("How many elements you want to enter \n"); scanf("%d", &n); printf("Enter %d elements \t",n); for(i=0; i<n; i++) { scanf("%d", &a[i]); } quicksort(a,0,n-1); printf("Sorted elements are \t"); for(i=0; i<n; i++) { printf("%d\t",a[i]); } } void quicksort(int a[20], int low, int high) { int j; if(low<high) { j=partition(a,low,high); quicksort(a,low,j-1); quicksort(a, j+1, high); } } int partition(int a[], int low, int high) { int end,start,temp,pivot; end=high; start=low+1; pivot=a[low]; do { while((a[start] <= pivot) && (start < end)) start++; while((a[end] > pivot) && (end > low)) end--; if(start < end) { temp=a[start]; a[start]=a[end]; a[end]=temp; } }while(start<end); a[low]=a[end]; a[end]=pivot; return end; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue