Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
funcion quicksort
#include <stdio.h> #include <stdlib.h> #define N 9 int compareIntegers( const void *, const void * ); int main(void) { //int N = 9; int i; int vector[N] = {-9, 55, 45, 12, 20, 0, 78, -11, 9}; qsort( vector, N, sizeof(int), compareIntegers); for (i = 0 ; i < N ; i++) printf("%d ", vector[i]); return 0; } int compareIntegers( const void *a, const void *b ) { int *ptrA = (int *) a; int *ptrB = (int *) b; if ( *ptrA == *ptrB) return 0; return ( *ptrA > *ptrB )? 1: -1; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
150109_RecursividadParImpar
B_141128_MatrizProducto
Practice Problem 7
variable arguments 2
Lab 9 v0.9
SAI_1-5.c
Practica 5 ejercicio beneficio empresa
18BCE2182 ASSESS_3 Q4
2.1.3 Sum of squares of first hundred natural numbers with different cores
bitwise manipulation using another function
Please log in to post a comment.